Re:Poll: How many programmers don't know about bit-wise oper...
by alexbowe on Sunday April 07, 2013 @08:26AM
(#5506962)
Although not part of the language proper, C++'s STL has vector<bool> that packs boolean flags into a bitvector (a now regrettable optimisation, since it doesn't function the way a container should - a story for another time). There is also bitset, which is similar but static.
Erlang has a beautiful language feature for this: http://www.erlang.org/doc/programming_examples/bit_syntax.ht... It uses pattern matching to unpack variable length fields in a bitvector. So beautiful.
Edit: Check arianvanp's post above https://news.ycombinator.com/item?id=5506902