Re:C for All
by saagarjha on Friday March 23, 2018 @02:37PM
(#16661260)
You can, as long as you stay away from templates and lambdas and STL containers; in short, most of the reasons you’d use C++.
[ Parent
| on HN ]
Re:C for All
by aurelian15 on Friday March 23, 2018 @02:47PM
(#16661358)
STL, RTTI and Exceptions should be avoided on embedded platforms (talking about 8 bit µCs here). I've extensively used both templates and lambdas on 8 bit AVRs (both the Tiny and Mega series); actually, writing templated code for µCs is a great way to avoid overhead stemming from function pointers etc. while still having well maintainable code.