3 ms·
If NULL is bad, simply invest NULL with the same ... behavior? semantics? as nullptr. I cannot for the life of me help but think that this is simply a distinct
by ArkyBeagle 11y ago
If NULL is bad, simply invest NULL with the same ... behavior? semantics? as nullptr.
I cannot for the life of me help but think that this is simply a distinction without a difference.
I work in the embedded space, and in each case when I've used C++ instead of 'C', me and at least one other senior ( and I mean age senior - +40 ) guy end up bemoaning that if we'd just had a 2-hour meeting on which subset of 'C' we'd have used, it would have taken half the time.
Oh so obviously, everybody has a different experience, and celebrate the diversity and all that, but I am really happy that I can always fall back on good old 'C' and get something done.
EDIT: s/invert/invest
- aidenn0 11y agoEmbedded is about 20 years behind the curve with regards to C++ best practices.
- magila 11y agoWorked for 6 years writing embedded C++, can confirm. The industry is dominated by stodgy old devs who still think C++ means C with classes.
- aidenn0 11y agoWell a lot of late '90s non-embedded C++ style was a very poor fit for embedded; everything dynamically allocated, lots of templates.
- ArkyBeagle 11y agoIt wasn't that bad.
- okatsu 11y agoC with classes is often frowned upon but I'm actually okay with it. It keeps things simple while still allowing for a few benefits. I think the Mars Rover project is a good example of that.
- ArkyBeagle 11y agoTo an extent. Some of it is less behind. This is part of the problem - it's a moving target. I've had things in the field with lifetimes of decades. That changes the incentives. But in general "big C++ in embedded" kind of went out with the dotcom crash.