third draft: add bitfields to D
Daniel N
no at public.email
Thu Jul 4 13:58:27 UTC 2024
On Thursday, 4 July 2024 at 12:20:52 UTC, Dom DiSc wrote:
> On Wednesday, 3 July 2024 at 19:02:59 UTC, Dave P. wrote:
>> Wouldn’t a more D-like syntax be to have the number of bits
>> following the type instead of following the variable name?
>> This would be more consistent with how D arrays are different
>> than C arrays.
>>
>> ```D
>> struct Foo {
>> uint:4 x;
>> uint:5 y;
>> }
>> ```
>
> I like this. As for arrays it's much more readable than the C
> syntax.
Yes, good idea.
More information about the dip.development
mailing list