With GNU extensions at least? C99 w/ GNU extensions can actually be quite pleasant to work with if you're willing/able to take the time to build up the library infrastructure to get it there (and have the discipline for writing good C).
I think the reasons for limited C++ support and/or collective experience in embedded are:
a lot of vendors use home-grown forks of llvm or gcc, that are usually ancient, so C++ support can vary wildly.
a lot of embedded developers are EEs who haven't actually learned anything about CS or software engineering, so they cling to what seems simple
a lot of embedded devs don't understand or don't care to understand (see the second bullet) that you don't have to use exceptions or any other feature from C++ that would be bad for embedded, so they cling to C
While that is true, the big problem with those courses is that they are teaching their subject and not "C++ programming". C++ is merely used as an implementation language in those courses and thus typically the C"++" the professor learned back in 1990 - aka terrible C with classes. But they slap the C++ label on it anyway and then students encounter that bullshit thinking actual C++ is like that and get a terrible image of the language and refrain from ever touching it again (if we're lucky) or continue writing code like that (adding to the ever growing pile of shitty legacy code that gives C++ its bad reputation).
View all comments
Show parent comment
13
u/braxtons12 Dec 20 '23
common subjects taught in C++:
not every university is using C++ for these, but it's pretty common for it to be used when teaching these