third draft: add bitfields to D

Dom DiSc dominikus at scherkl.de
Fri Jul 5 08:25:42 UTC 2024


On Thursday, 4 July 2024 at 18:34:00 UTC, Steven Schveighoffer 
wrote:

> ```d
> uint:4 value(){
>    // return 200; // error
>    return 7; // ok
> }
> ```

Yes, super!
This would also allow us do define

```d
alias uint:1 bool
```

and be sure assigning a value larger than 1 to be an error!


More information about the dip.development mailing list