4 ms·
C++ still has the preprocessor and all the horribleness that brings. It's also still a language where you need to know a lot of underlying details about how th
by t43562 3y ago
C++ still has the preprocessor and all the horribleness that brings. It's also still a language where you need to know a lot of underlying details about how things work because you want to not be slow and you want to know whether or not you've just allocated memory that you have to manage. You need to know about integer sizes, how characters and integers are similar, pointers and dereferencing.
You can still leak memory easily and use after free, segfault and so on.
So IMO there's a cognitive load where you cannot ignore how things are happening as you might in a dynamic language. Stuff can be static or inline or stack based or heap based and all of it matters. C was bad enough but C++ just piled on more and I got tired of that really. Boost took a million years (subjectively) to turn into something decent and I remember not being able to use any of it because of being stuck on an old compiler on Windows.
I do hope we've moved on from having to build a lot of optimisation in by hand towards being able to describe a problem with it's constraints and limits and have the optimisation done for us.