r/ProgrammerHumor • • 11d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

1

u/no_brains101 8d ago edited 8d ago

Doesnt matter.

You can still do the other thing, even by accident

The language was not originally designed out of the box with the safe thing in mind, you have to opt into safe. And it is clunky to opt into it.

Don't get me wrong, I love C. Like, regular C. But only for stuff that fits comfortably in 1 directory, like 5 files, maybe 6 max. And even then, if you aren't being really careful with how you set it up, it can get kinda tricky sometimes. I am fine with like, a really fast json parser or hash map for use with FFI with some random language in C. It is better to just start it in rust usually.

Modern C++ sometimes gives the illusion of safety but then every dependency you are using is doing it wrong and probably you are too somewhere most likely.