On Thu, 01 May 2014 16:03:06 -0400, Andrei Alexandrescu <seewebsiteforem...@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.

-Steve

Reply via email to