Summary: More bells & whistles for bitfields
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Phobos

--- Comment #0 from 2010-07-04 12:39:29 PDT ---
When bit fields are used to define bit protocols etc., they sometimes have
constant fields, or already initialized variable fields. So It can be positive
for std.bitmanip.bitfields to support that too, this is an example:

          field1 : 1;
          field2 : 2 = 0b01;
immutable field3 : 3;
immutable field4 : 4 = 0b1110;

As with normal immutable fields in structs, the language has to forbid the
write on immutable fields. Probably in many cases the compiler can't enforce
this at compile time on bit fields (because of the type system granularity;
something similar happens with pointers to single bits in bit-arrays), so
probably the bit field immutability needs to be enforced at run-time (maybe
even in release mode too, because it's a hard constraint).

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to