r/ProgrammerHumor • • 13d ago

Meme cppAndItsVectorBooleans

Post image
3.4k Upvotes

214 comments sorted by

View all comments

32

u/Luzzgar 13d ago edited 13d ago

Yet another example of C++ doing something in a weird and not obvious way.

Making a deep knowledge if its inner workings mandatory to use it correctly, which is the antithesis of a good programming language.

That's the kind of crucial details that should be communicated to the user directly.

8

u/Ahmouse 13d ago

It's only weird if you assume their intention is to make it easy and intuitive to use. Maybe the goal was job security for the experts that learn it.

2

u/nicuramar 13d ago

As long as you only use it in an “STL way”, you don’t really need to know of its inner workings.