3 ms·
Not necessarily a waste in all languages. A c++ `std::vector<bool>` efficiently packs bits for example, although it does have its own 'issues'.
by glxxyz 1y ago
Not necessarily a waste in all languages. A c++ `std::vector<bool>` efficiently packs bits for example, although it does have its own 'issues'.
- aDyslecticCrow 1y agoI kinda hate that. It gives the vector very special behaviour for one type in particular, going against the intuition behind how both boolean and vector works everywhere else in the language. Id prefer if they just added std::bitvector.
- verall 1y agoYes, this is interestingly considered one of the worst design decisions in C++ history. It's not /the/ worst but it's up there.