Re:Why Aren't There C Conferences?
by monocasa on Wednesday November 21, 2018 @02:04PM
(#18505106)
Seriously, check out TI's C++ support for their DSPs. Last time I checked they were so behind the curve they didn't even support templates.
[ Parent
| on HN ]
That might because they are targeting Embedded C++, which explicitly eschews these features.
Full C++11 support has been on their roadmap for years. http://e2e.ti.com/support/tools/ccs/f/81/t/542711
And IMO, the final Embedded C++ spec is such a terrible idea that it doesn't absolve them. Having written a C++14 RTOS, if I had to give up multiple inheritance, namespaces, sane casts, and templates, I would have just written the damn thing in C to start off with. The value proposition of institutionalized C with Classes doesn't do it for me.
See https://www.youtube.com/watch?v=TYqbgvHfxjM for what you need to do to have C level perf while using the type system to still get you something.
You may want to take a look at Apple's Embedded C++ implementation for I/O Kit, which is grounded strongly in object-oriented programming and inheritance: https://developer.apple.com/library/archive/documentation/De.... Of course, it does drop the very features you seem to enjoy, namely multiple inheritance, namespaces, and templates, but I think there is more reason to this apart from "these things are complicated to implement/hard to use"–I/O Kit was based on NeXTSTEP's DriverKit, which was written in Objective-C and offered none of these features.
Template metaprogramming is very useful on embedded :)
https://github.com/kvasir-io/kvasir