More radical ideas about gc and reference counting

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Thu May 1 14:33:56 PDT 2014


On 5/1/14, 2:21 PM, Steven Schveighoffer wrote:
> On Thu, 01 May 2014 16:03:06 -0400, Andrei Alexandrescu
> <SeeWebsiteForEmail at erdani.org> wrote:
>
>> On 5/1/14, 12:52 PM, "Nordlöw" wrote:
>>>>> into a class. I'm inclined to say that we should outright prohibit
>>>>> that,
>>>>
>>>> That can't happen.
>>>
>>> Why is that?
>>
>> (1) Too much breakage, (2) would disallow a ton of correct code, (3)
>> no reasonable alternative to propose. We'd essentially hang our users
>> out to dry. -- Andrei
>
> class C
> {
>     void finalizer();
>     private struct S {
>       C owner;
>       ~this() {
>          owner.finalize();
>       }
>     }
>     private S s;
> }
>
> You aren't helping anything.

There's a misunderstanding somewhere. -- Andrei



More information about the Digitalmars-d mailing list