Wouldn't this be better with bitfields?

Dukc ajieskola at gmail.com
Sat Jul 6 18:05:31 UTC 2024


Dukc kirjoitti 6.7.2024 klo 20.56:
> Note that the author does need to use mentioned alternatives a lot 
> anyway to integrate with underspecified C types, such as `long`.

Actually this is an analogy I want to push. Ask yourself, why is `long` 
defined as exactly 64 bits in D? Why isn't it defined to have the same 
size as associated C `long`?

This is why language-level bitfields should not attempt to mimic C 
either, at least not by default.


More information about the Digitalmars-d mailing list