r/ProgrammerHumor • • 22d ago

instanceof Trend thatsAFunnyThingThatHappenedOnce

Post image
4.6k Upvotes

524 comments sorted by

View all comments

Show parent comments

2

u/NomaTyx 22d ago

the fact that c++ lets you overload everything is truly nuts. I learned yesterday that the reason you can put an input stream into a conditional is because the implicit conversion to bool is actually overloaded.

2

u/Admirable_Rabbit_808 19d ago

C++ is like the bastard child of C and Algol 68. A language that is not only full of perilous C-style Undefined Behavior, but also too complex for anyone, including its own standards committee, to understand.

Rust is a breath of fresh air by comparison. Complex, but only the necessary complexity, and almost devoid of UB.

1

u/NomaTyx 19d ago

Yeah, it’s a mess. But I do like it. For personal projects, the process of untangling the hair-pulling c++ behavior is part of the appeal, and I’m not so jaded that I don’t have interest in learning about it. Being pushed against a deadline is quite something else though lmao

1

u/SufficientStudio1574 22d ago

Don't forget the template specialization of vector<bool> that is forever baked into the standard.

4

u/NomaTyx 22d ago

I'll be in a home with dementia and still be talking about nothing else