I Want What The Committee Was Smoking

I Want What The Committee Was Smoking
cpp-memes, c++-memes, vector-memes, standard-library-memes, language-design-memes | ProgrammerHumor.io

So someone enthusiastically declares C as their favorite language, and the drunk committee member in the back immediately starts screaming the truth: vector<bool> is neither a proper vector nor does it actually store bools. It's a "space-optimized" abomination that packs bits together, breaking the entire mental model of what a vector should be. You can't even get pointers to individual elements because they're bit-packed. The C++ standards committee really thought "hey, let's make this one specific template specialization behave completely differently from every other vector type" and then went home for the day. It violates the principle of least astonishment so hard that seasoned C++ devs still get caught by it. The committee member is having a meltdown because this design decision haunts them to this day.

More Like This