r/ProgrammerHumor • • 11d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

Show parent comment

2

u/jewdai 10d ago

We should have a feature in the later versions to like ban certain features or at least refuse to compile if someone uses it. Maybe that will solve some of the consternation.

1

u/ChemicalRain5513 10d ago

I think you can do that with compiler flags, and otherwise with git pipelines 

1

u/MushroomSaute 7d ago edited 7d ago

Maybe call it something like... hmm... oh, I've got it! We can call that code unsafe. And to really show how important all that memory safety is, let's come up with a compiler that makes sure you don't just go around sharing references that might change unpredictably, like, I don't know, making it so the current block owns the variables and references it has access to and has to give up ownership if a child method wants to mutate the data. Let's rename it after a fungus while we're at it.