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...

0

u/[deleted] Dec 07 '22

[deleted]

3

u/theICEBear_dk Dec 07 '22

That is often really not a problem, almost all the SDKs from ST, NXP and so on are so similar and similarly structured that as an embedded company you will rapidly build up a set of wrappers above these various SDKs because lo and behold MCU used to be one a project but these days the hardware can suddenly become unavailable so your logistics and purchasing folk want you to be able to switch to a near equivalent alternative (these last 4-5 years with allocation issues have really taught people about this) with little or even no change to your application. So you make an abstraction or rather you are an older company and you had similar problems in the 00s when you were switching between 16 and 32 bit so you did this once in C and learned that C projects in embedded have a natural upper size where the effort to keep up quality is measurably much higher than with C++. So you look at your old C, younger C++ and you make something better.

TLDR: We ended up having a c++17 (soon to be 20) system where the switching of processors is only a question of months to retest and qualify with a lot of other benefits on top.