| ▲ | t0mpr1c3 a day ago | |
I've been writing C++ for embedded systems the past year or two. We use a very conservative subset of C++, almost like C with inheritance. We barely even use templates. We try to avoid allocating on the heap. The code is mostly imperative. Since 2011, a lot of new language features have been introduced. The ones we use are things like smart pointers (that improve lifetime management) and some tweaks for better type safety. It is said that moden C++ enables a functional programming style. I have never actually seen anybody code that way (it would be hell to write and worse to read) but that could just be the niche I'm in. What is undeniable is that C++ is so complex and has so many features that you have to choose a subset of the language to enforce a consistent style. Also a lot of the STL (standard library functions) are deprecated in one way or another, which is a real minefield. | ||