Rebooting the __metada/__mutable discussion

Alexandru Ermicioi alexandru.ermicioi at gmail.com
Sun Apr 10 15:04:50 UTC 2022


On Friday, 8 April 2022 at 18:00:14 UTC, rikki cattermole wrote:
> Here is my test code that I used to determine what I needed to 
> do to make const RC types useless (and hopefully safe).
> ...

Isn't better then to try and find design patterns or rules for 
use with mutable RC structures?

All the talk across the years was basically about trying to eat 
the pancake and also at same time trying to keep it for later, 
and neither is done after all deliberation across the years. 
Perhaps it would be best to just break the existing immutable 
system, and redefine it to allow rc features found in C++ or 
other languages, or just have a limited version of rcs in D 
(compared to C++ or other languages employing them), and 
workaround those restrictions through some well defined rules and 
design patterns.

And when mentioning breaking the immutable system, I really mean 
breaking it, by removing the transitiveness it has, or some other 
major change, like not being really immutable, and therefore safe 
to put in readonly memory.




More information about the Digitalmars-d mailing list