Ask HN: Use C with Classes for Embedded?
2 Surac 7 5/5/2025, 5:43:04 AM
Hello. I am writing code for embedded systems. Most cpu are ARM or SoftCpu from FPGA vendors. Up to now I use C11. All the CPU are supported by gcc, thank god. I used to write c++ before C++ 11. The good old time. I now think more and more often to switch to C++ on embedded. No exceptions no RTTI no STL or Boost. Just C with Classes for the luxury of C++. What do you think? Is it worth the hazel?
When you have 64 bytes of working (non program) memory, you pretty much need to declare everything up front anyway, so no stack either. It all depends.