I am about to start a new realtime project. Now there is (again) the debate about c vs c++. Yes I read about Linus and all the other threads on SO.
First I was tending more towards to use C but then I read an answer that C++ includes C. Then I read on the internet about “Embedded C++“.
According to this article EC++ is dead. But I think a kind of “feature guideline” for C++ could be useful to manage the complexity of C++.
So now I ask myself (and you):
- Do you use Embedded C++?
- Are there other other guidelines for using C++s features in your company/project? (apart from just formatting guidelines)
I develop professional software for an embedded platform (ARM). We use C++.
We do have a number of common and reasonable guidelines, but nothing that is specifically there because of embedded systems. We have no restrictions on C++ features (no exception ban etc).
A “feature guideline” might help you but will not eliminate the need to just learn the language. Which takes some time. If you don’t have the time, choose a different language that can be learned faster.
As for C vs. C++ vs. EC++:
In another company we developed software for embedded boards that needed to be battery-powered and had really small memory. In that case C can be sufficient, but still doesn’t really provide an advantage. If this is not the case, choosing C over C++ is like choosing a pedal car to drive on a german highway. It is ridiculous.
I just read about EC++ and just could not figure out what advantage it might provide. I just couldn’t. Without EC++ there is still now one forcing you to use exceptions.
I second that.
I have thought about this now and then. Avoiding C++ might just be a strategy of people who are too [beep] to learn C++ and who are then arguing that there are technical reasons.