3 ms·
I 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 metaprogrammi
by fwsgonzo 6y ago
I 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.