RfC for language feature: rvalue struct
Dukc
ajieskola at gmail.com
Tue Jan 31 11:52:33 UTC 2023
On Tuesday, 31 January 2023 at 07:31:58 UTC, FeepingCreature
wrote:
> On Monday, 30 January 2023 at 20:15:48 UTC, Dukc wrote:
>> I don't see a need for fields to be non-referenceable since
>> immutability protects them if the data in question is already
>> committed.
>
> Yes, again, the idea is that rvalue allows *overwriting mutable
> variables* of this type.
In that case I'd probably go with a mutable pointer to an
immutable struct. That way you can replace the value in whole,
but not single fields of it.
More information about the Digitalmars-d
mailing list