Regarding the proposed Binray Literals Deprecation

Adam D Ruppe destructionator at gmail.com
Sat Sep 10 20:01:44 UTC 2022


On Saturday, 10 September 2022 at 19:53:11 UTC, Walter Bright 
wrote:
> Of course, bit fields might be better :-)

Not for this! At least not the godawful C flavor of bitfields.

As you know, the actual layout is implementation defined. Which 
means it is of extremely limited value for hardware interop.

This is one thing the Phobos template at least defines (though it 
isn't great either).

What I'd like to see for D bitfields is a *good* system, that 
defines these things in a useful manner. C's things is ok for 
packing bits into available space, to make private structs 
smaller. But its undefined bits make it unsuitable for any kind 
of public api or hardware matching.


More information about the Digitalmars-d mailing list