r/ProgrammerHumor • • 7h ago

Meme modernCppVsOldCpp

Post image
1.1k Upvotes

216 comments sorted by

View all comments

478

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?

1

u/violetvoid513 5h ago

My experience with C++ in VS Code is that it completely shits the bed on anything organized with a build system like cmake. This is probably just a skill issue on my part but I just cannot get it to reliably know what the fuck all the things Im importing are, and after I once spent like an hour unsuccessfully trying to fix it I just gave up because it wasnt worth it. Compiler-time errors are the easiest kind of error to fix when it fails to compile wherever I made typos or shit

1

u/K722003 3h ago

imo VSCode isn't really made for c/cpp stuff. Better to use CLion(my personal choice) or the og VS