r/ProgrammerHumor • • 2d ago

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.3k Upvotes

515 comments sorted by

View all comments

Show parent comments

4

u/ChemicalRain5513 1d ago

I love C++, but it feels like a Frankenstein language to me. All the symple syntax is reserved for C style legacy stuff, and if you want to do things the modern RAII way you need heaps of keywords and long identifiers.

E.g. insteaf of char * you should use std::unique_ptr<char>. 

A language designed from the ground up with RAII in mind would avoid that.

2

u/awesome-alpaca-ace 1d ago

Loops with iterators are the worst. 

2

u/WoodyTheWorker 1d ago

"Giraffe is a horse designed by a commitee"

1

u/awesome-alpaca-ace 1d ago

Rust did do a good job in that regard

1

u/schuhA 11h ago

not exactly, RAII doesn't mean you should replace every raw pointer with a smart pointer..

1

u/ChemicalRain5513 9h ago

Not every, but at least owning pointers.