3 ms·
Orthodox C++ echoes the old "Embedded C++" scam. In that case, the impetus was to dress up having failed to implement templates, exceptions, and other "new" la
by ncmncm 6y ago
Orthodox C++ echoes the old "Embedded C++" scam.
In that case, the impetus was to dress up having failed to implement templates, exceptions, and other "new" language features, typically as a result of budget cuts.
In this case, it appears to be, rather, to avoid learning anything new.
Make no mistake: code written to this, or any old-school subset, is Bad Code. Features are not added to C++ on a whim. They are added because they make programming in new C++ a better experience than old C++. New C++ code is faster, safer, smaller, less bug-prone, and more fun than old C++. C++20 is much more fun than C++17, which is better than C++14, which filled out lots of features from C++11.
Do not trust anyone suggesting any virtue in more C-like C++ code, or in actual C code. We left those behind for reasons.
C++23 will be better than C++20.
- fwsgonzo 6y agoI completely agree. The fact that the first example is using printf just shows that the best it can offer is some things we already know (template metaprogramming sucks etc.). C++20 has std::format which is insanely more powerful, safe and performant than printf. To say that you should only be using the non-allocating functions is also bad advice. The whole thing reeks of someone who didn't bother to measure where he was actually spending time. I didn't read the whole thing but I'm expecting that hes bashing exceptions too, even though they don't cost anything other than code size unless you actually throw. And it's perfectly fine to turn them off, if you're fine with abort. Really, the only thing I can think of that I really dislike about both C and C++ is that backtraces should have been a first class citizens since the early 2000s. I think that's a huge reason why people pick up other languages more quickly too.