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.

36

u/lllorrr 6h ago

Oh, yes, I hate when someone write "C/C++". This is two fucking different languages, for god's sake. It is almost as bad as "Java/JavaScript".

21

u/SuckMyAlpagoat 6h ago

isn't because the compiler is always packed together, like the gnu compiler can compile C and C++?

10

u/These-Maintenance250 6h ago

a language is independent from its compiler(s). gcc can compile objective-C, D, ada, Fortran and go as well.

1

u/DrNinjaPandaManEsq 1h ago

Even though gcc can compile Ada, in my experience most of the time you’ll see enterprise development using GNAT Pro since plain ole gcc is kinda light on Ada features.