Helping with __mutable (which will be renamed to __metadata)

rikki cattermole rikki at cattermole.co.nz
Sat Apr 13 04:49:01 UTC 2019


On 13/04/2019 3:45 PM, Suleyman wrote:
> On Saturday, 13 April 2019 at 01:17:55 UTC, rikki cattermole wrote:
>> I'm concerned that it will be used as an escape from the type system 
>> arbitrarily. Right now there is nothing to discourage the abuse of 
>> this storage class.
>>
>> Is there something we can do to discourage abuse?
> 
>  From skimping through the DIP it doesn't look too dangerous it seems 
> like just a fancy 'shared' escape for immutable fields, the rest looks 
> the same as casting immutable away in @system code.

What you described is a feature that escapes the type system which can 
lead to program crashes. Read only memory is what I'm concerned about.


More information about the Digitalmars-d mailing list