18 ms·
> Secondly, I’d like to question: if C has bitfields, then why do seemingly all modern C APIs not use? Because an unsigned integer containing many flags is con
by orlp 2y ago
> Secondly, I’d like to question: if C has bitfields, then why do seemingly all modern C APIs not use?
Because an unsigned integer containing many flags is convenient for setting/toggling/clearing multiple options at once. At least in C doing that with bit fields is a pain.