DIP: add Bit Fields

Dennis dkorpel at gmail.com
Thu Mar 7 12:04:37 UTC 2024


On Thursday, 7 March 2024 at 04:26:56 UTC, Walter Bright wrote:
> https://github.com/WalterBright/documents/blob/master/bitfields.md

> I've seen plentiful use of it, and have not seen any "do not 
> use bitfields" programming guidelines.

[Bit-fields in C have acquired a poor reputation in the 
programming 
community](https://andrewkelley.me/post/a-better-way-to-implement-bit-fields.html)

[C bitfields considered 
harmful](https://www.flamingspork.com/blog/2014/11/14/c-bitfields-considered-harmful/)

[So don't go for bitfields "just 
because"](https://yarchive.net/comp/linux/bitfields.html)

[Bitfields seem to be perfect for this, but they're so poorly 
specified in the standard that common "best practice" is to avoid 
them.](https://www.reddit.com/r/C_Programming/comments/146tbnp/why_is_using_bitfields_in_high_performance/)



More information about the dip.development mailing list