SAOC 2021 Projects Summarized

Adam D Ruppe destructionator at gmail.com
Mon Aug 30 16:12:57 UTC 2021


On Monday, 30 August 2021 at 16:03:29 UTC, Guillaume Piolat wrote:
> Hyped by ProtoObject, this is our hope for a nothrow @nogc 
> .destroy eventually!

This fails today only because of the rt_finalize hook working 
through void*. If you cut that out...

---
class Foo {
         ~this() @nogc nothrow {}
}

void main() @nogc nothrow {
         scope auto foo = new Foo();
         foo.__xdtor();
}
---

this works today.

.destroy does this if it is an extern(C++) class, but not for a D 
class. It isn't limited by Object though. I think the templated 
druntime hooks might make more of a difference here than 
protoobject.


More information about the Digitalmars-d-announce mailing list