top | item 13692689

(no title)

bobmoretti | 9 years ago

As the article and others here have said, if you have the requisite proficiency and understanding of C++ and the C++ compiler(s) that you're using, and if you are using a high quality optimizing compiler like GCC, there is no reason that C++ code will be any larger in footprint than C code.

As the author points out, C++ offers very significant and tangible benefits, and in the right hands/with the right discipline should be less error prone and result in more efficient code. In my opinion, C++'s greatest benefit for embedded programming is that it has a wealth of abstractions that have no runtime overhead.

The are several reasons that C is still king, but I suspect the main one is portability. Your company may need to be able to port its software to some obscure microcontroller where the only compiler available is a buggy C89 implementation. Or if it has C++ support, odds are that it is inefficient and out of date.

Because of this and other reasons, the labor pool of "deeply" embedded software engineers has a heavy bias towards C over C++. This compounds the problem, reducing the incentive for embedded engineers to learn modern C++.

discuss

order

pjmlp|9 years ago

You are forgetting the ones that "only over my dead body" kind of folks.

Which according to Dan Saks talk at CppCon and interview at CppCast, there are plenty of them in the embedded space.