r/cpp • • Dec 07 '22

C++ overtakes Java in language popularity index

https://www.infoworld.com/article/3682141/c-plus-plus-overtakes-java-in-language-popularity-index.html
382 Upvotes

137 comments sorted by

View all comments

119

u/feverzsj Dec 07 '22

Kinda make sense. There are tons of embedded c++ jobs emerged this year. Mostly from automotive and medical industry.

68

u/SkoomaDentist Antimodern C++, Embedded, Audio Dec 07 '22 edited Dec 07 '22

Only a fool starts a new embedded project using C unless it's for a rare niche platform that doesn't have a working C++ environment. Unfortunately there are still many fools around.

E: I didn't expect to get downvoted on /r/cpp of all places for advocating using C++ instead of C for systems where C++ is almost ideally suited for...

1

u/mort96 Dec 08 '22 edited Dec 08 '22

A lot of the stuff in microcontroller projects doesn't really benefit from C++ though. You basically can't use the STL because you don't wanna dynamically allocate memory willy nilly. You have to be careful with your use of templates to avoid code size bloat. You're probably going to be using a hardware abstraction library made for C, so you'll have to hope that those headers are designed to work with a C++ compiler (which isn't that easy these days; C++ really hasn't kept up with C).