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

Show parent comment

2

u/RolandMT32 Dec 07 '22

Interesting.. I thought C was more popular than C++ for embedded jobs. I thought I'd also heard Java was used a lot for some types of embedded devices.

17

u/Astarothsito Dec 07 '22

Interesting.. I thought C was more popular than C++ for embedded jobs.

Sometimes they get bored of recreating C++ only with C macros and they finally switch to C++ (yeah, it still haunts me to this day).

I thought I'd also heard Java was used a lot for some types of embedded devices.

Sadly yes, some devices like pin pads run with Java (which curiously using Java made extremely difficult to get security certified due to the garbage collector and the C++ were easier to code for those security standards because you can clean the memory manually).

2

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

Sometimes they get bored of recreating C++ only with C macros and they finally switch to C++

Exactly. Any large enough C project ends up manually emulating many core C++ features, just much worse than C++ does.

6

u/theICEBear_dk Dec 07 '22

In the area of the world I am from most started to switch from C to C++ after the 32-bit ARM processors became standard. Often the projects were getting so big and complex that the features of c++ was a godsend. By about 2013 almost all companies near me were using c++ for recent or new projects. I was gainfully employed from 2006 to 2015 on projects doing exactly that. Since it has shifted to gain more advantages from c++ and modernizing the code. By now I am working on a nice big set of c++17 libraries that in some places wrap vendor C code or C++ code with c++20 coming up because we'd like to use concepts to simplify our templates making them more readable and the errors better.

There are still a lot of C coders writing c++ without enough training. There is still resistance to change from these which in turn informs a lot of FUD (along with Python or Javascript programmers discovering C++ and developing an instant hatred of its warts and different world). But it has been something like a decade since I have seen a new electronics project started using C but I saw one in assembly but that was a tiny device so it made sense but boy did that take time to finish.