3 ms·
Most of the C++ features does not require compiler to add anything extra to the binary, there are however some exceptions from this rule, e.g. exceptions (no pu
by mbel 11y ago
Most of the C++ features does not require compiler to add anything extra to the binary, there are however some exceptions from this rule, e.g. exceptions (no pun intended) and RTTI.
The biggest problem with using full C++ as C + <small subset of C++ features> is that at some point people will stop writing in C style and start to use STL and design code using C++ idioms. You can probably try to fight this with coding standards, linters and other tools but policing people will require some additional effort.
- bsenftner 11y agoJust never put STL into your environment. What's what I've seen at a number of C purist dev shops. At first, younger C++ developers complain about the missing STL, but if they actually know how to write the algorithms STL provides, their complaints die after some ribbing from the old guys. It's actually something of beauty when a developer realizes how much of a crutch STL had been to them, and the ease of working without it. Code complexity reduces too, because STL seems to encourage creating complexity over simplicity. Teah, it's not supposed to be that way, but we live in the real world.
- catnaroek 11y agoI'll be the last one to say the STL (or, rather, its standard library port) is pretty, but damned should I be if I need to reimplement the same data structures and algorithms over and over. Parametric polymorphism is something every statically typed programming language should have in 2015. I'm aware templates aren't quite parametrically polymorphic, but it's still better than nothing.