We need a typesystem-sanctioned way to cast qualifiers away

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sun Jun 21 21:12:34 PDT 2015


On 6/21/15 8:43 PM, Tofu Ninja wrote:
> On Monday, 22 June 2015 at 02:54:27 UTC, Andrei Alexandrescu wrote:
>> All good points. I think we need to accept that immutable objects must
>> rely on the garbage collector; reference counting them is not accepted
>> in D's type system. -- Andrei
>
> I am confused, what is wrong with having a mutable ref counted wrapper
> type that can carry an immutable payload?

It doesn't compose - e.g. soon as you want to make an immutable list of 
lists it comes unglued. -- Andrei



More information about the Digitalmars-d mailing list