Nick Sabalausky wrote:
Provided that they aren't as crappy as the ones in C, bitfields can be immensely useful for anything really low-level, like embedded systems, drivers, firmware, or packed data formats for network or file I/O (ie, "systems programming" stuff). Anything higher-level then that, though, and their usefulness certainly does seem to diminish.
I've written a lot of bit twiddling code. Bitfields are not immensely useful. They're at best a trivial convenience, and often result in poor code generation as compared with using bit masking operations.
