How does rt_finalized function work exactly? (Fixing bugs regarding Destroy).

Steven Schveighoffer schveiguy at yahoo.com
Fri Jan 19 20:21:44 UTC 2018


On 1/19/18 2:48 PM, 12345swordy wrote:
> I see, this does look like it needs a DIP in order to fix this. How the 
> progress of the calls being replaced by templates by Andrei and company?

Here are the improvements that Lucia is doing/has done, which is a lot 
of good stuff:

https://github.com/dlang/druntime/pulls?utf8=%E2%9C%93&q=is%3Apr+author%3Asomzzz

But really, I think we need a DIP to clarify the model of destructors 
and attribute inheritance. Right now, there is nothing (just that you 
can have attributes): https://dlang.org/spec/class.html#destructors

There are some notes about destructors in the attributes section, e.g. 
"Pure destructors do not benefit of special elision." But there is 
nothing talking about how the attributes are inherited, or rules about 
when they can be called.

I would love for Object to have it's attribute shackles removed. It's 
not just destructors, but toString, opCmp, etc.

-Steve


More information about the Digitalmars-d mailing list