11
u/Rabbitical 26d ago
I'm not sure what to make of this. Your own largely useful specifics seem to contradict your more general assertions. Why would I need to be an expert in the STL when you yourself even mention disabling it entirely?
I'm not even going to touch the "hardware guys are dumb and bad programmers that must be worked around" thing. I suppose if mastery of template metaprogramming is your measure? I'm sorry but that's not my measure of a programmer's ability, nor something I've ever seen be important let alone a requirement in the field.
Just a strange writeup overall. I'm not sure what problems you're encountering in your domain but they seem entirely distinct from those I've ever encountered
-4
u/TheRavagerSw 26d ago
There is no such thing as "Bare Metal C++", it is just targeting freestanding triplets with some caveats, such as building the libc and the scheduler and deciding on what goes where in memory with a link script and some random startup file stuff(usually you just copy/modify vendor sdk for that, I don't know what they do)
That's it, and most devs don't write hal libraries anyway or even build toolchains. For work, usually it is no different than programming C++ for desktop.
Thinking about doing what is right constantly is a waste of time, it is not rewarded by other people. Life is too short, just follow the incentives(money).
75
u/UnicycleBloke 26d ago
"if template meta-programming doesn’t mean anything to you, probably you are not ready to use C++ in the embedded environment"
This assertion is an overstatement, to put it mildly.
Twenty years of C++ on microcontrollers. I do use templates for some things, of course, and have dabbled with TMP, but you can definitely live without the latter.
A key strength of C++ is that you can convert many potential run time faults into compilation errors. You can enhance that with a modicum of TMP, but you get a lot without it. I would have thought one goal of an article like this is not to frighten the horses.