Rebooting the __metada/__mutable discussion

Paul Backus snarwin at gmail.com
Fri Apr 8 15:14:49 UTC 2022


On Friday, 8 April 2022 at 14:23:01 UTC, H. S. Teoh wrote:
> Basically, unless you have a hack like __mutable, you basically 
> have to throw out const/immutable entirely from your data 
> structures once any part of it involves RC.

You can make RC work with const and immutable if you're willing 
to give up on pure:

https://gist.github.com/pbackus/1638523a5b6ea3ce2c0a73358cff4dc6

Personally, I would rather give up on pure (which already has 
loopholes in it) than add a loophole to immutable (which 
currently has none).


More information about the Digitalmars-d mailing list