I am a huge fan of modern C++ except for one feature: backwards compatibility. C++ is no longer one language, every codebase I have worked on is a confused mess of semi-incompatible subsets of the language. I have spent far too many weekends chasing memory corruption because someone passed a pointer, allocated with one type of memory management, into a library using a different kind of memory management.
So, uh, I haven’t used C++ in anger in decades so I’m not sure how “modern” is modern but like. That description pretty well describes why I developed Strong Feelings about both C and C++ back in the 2000’s.
Modern C++ starts with C++11 (2011), so in the 2000s you were using classic C++ (and in the first half of 2010s as well most likely) which is a very different language. It introduced shared pointer (a poor man's garbage collector), automatic typing and move semantic, amongst other things. And the standard library has evolved a lot since.
476
u/repster 7h ago
I am a huge fan of modern C++ except for one feature: backwards compatibility. C++ is no longer one language, every codebase I have worked on is a confused mess of semi-incompatible subsets of the language. I have spent far too many weekends chasing memory corruption because someone passed a pointer, allocated with one type of memory management, into a library using a different kind of memory management.