4 ms·
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.
by monocasa 8y ago
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.
- saagarjha 8y agoThat might because they are targeting Embedded C++, which explicitly eschews these features.
- monocasa 8y agoFull C++11 support has been on their roadmap for years. http://e2e.ti.com/support/tools/ccs/f/81/t/542711 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 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.
- saagarjha 8y agoYou 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/DeviceDrivers/Conceptual/IOKitFundamentals/Features/Features.html 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.
- ManDeJan 8y agoTemplate metaprogramming is very useful on embedded :) https://github.com/kvasir-io/kvasir https://github.com/kvasir-io/kvasir
- saagarjha 8y agoI've only glanced at this, but this caught my eye: > The header only nature of Kvasir and very sophisticated use of the volatile keyword This isn't a particularly encouraging sign…