Rebooting the __metada/__mutable discussion
Dennis
dkorpel at gmail.com
Wed Apr 13 12:59:30 UTC 2022
On Wednesday, 13 April 2022 at 12:31:44 UTC, Zach Tollen wrote:
> Maybe there is some other natural use for `@system` variables.
> But none of the use cases I have seen seem particularly
> incompatible with the additional `__mutable` functionality.
Without conflating `@system` and `__mutable`:
```D
struct Boolean
{
@system ubyte payload; // must be 0 or 1 or buffer overflows
could happen
}
immutable Boolean b; // can be placed in read-only data segment
```
When conflating `@system` and `__mutable`, `b` suddenly must be
placed in mutable memory.
More information about the Digitalmars-d
mailing list