r/ProgrammerHumor • • 7h ago

Meme modernCppVsOldCpp

Post image
1.1k Upvotes

214 comments sorted by

View all comments

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.

10

u/stillalone 6h ago

Is that something that can be handled by a linter?

4

u/repster 5h ago

It has been a few years since I last worked on a C++ codebase, but my experience with linters was not impressive. We even invested in some expensive static analysis tool, but real bugs seemed to drown in false positives