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

-2

u/noooit Dec 07 '22

Probably because people know that limited flash and typical application c++ programmers are one of the worst combination for embedded.
IMO, it's easier to hire embedded c programmers than embedded c++ programmers.

7

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

"Limited flash" means from many hundreds of kBs to a couple of MBs these days. Even the lowest end Cortex-M0s tend to go up to a hundred kB or more. Small handheld devices often have MCUs with hundreds of kB of ram and a megabyte or two of flash (source: last two jobs writing code for handheld devices with such specs). It ain't the 90s anymore even if many embedded people on internet seem hell bent on forgetting that.

As for C vs C++ programmers, having had to unfuck several projects initially started by C programmers, I'll take C++ devs any day.

1

u/hak8or Dec 08 '22

source: last two jobs writing code for handheld devices with such specs

Then you were statistically lucky. Hundreds of KB of flash is not common in all embedded fields. Having hundreds of KB is a luxury in my experience, I tend to be stuck with 32 KB or smaller, on cortex m0+'s at best, for example.

To be clear, I do think c++ is perfectly fine for a target that even has only 16 KB of flash. What I am disagreeing with is your assumption that it's common for MCU's to have hundreds of KB of flash.

-6

u/noooit Dec 07 '22

As for C vs C++ programmers

No, I'm talking about embedded programmers.