On Friday, 25 May 2018 at 21:01:16 UTC, Mike Franklin wrote:
On Friday, 25 May 2018 at 20:08:23 UTC, 12345swordy wrote:
https://github.com/dlang/DIPs/pull/120

Feedback would be very appreciated.

I was under the impression that Andrei's ProtoObject was supposed to remedy that: https://forum.dlang.org/post/[email protected]

Mike

It's not enough for destructors because they work "both ways".

If we have a universal base class with a @nogc destructor, then no subclass can have a non-@nogc destructor. In particular, it won't be compatible with today's Object. But if the universal base class has a destructor that's not @nogc, then classes can't ever be destroyed in @nogc code because destructors need to recurse to base class destructors.

I think we have to either give up on having a sole universal base class, or special-case destructors in the language (or some combination of both).

Reply via email to