On Thursday, 22 March 2018 at 21:37:40 UTC, Basile B. wrote:
[snip]

I don't say that's the solution. I think there's no solution.

I'm not sure there's no solution, but there's definitely no EASY solution. And when I say solution, I don't mean a resolution of this specific issue. I mean to resolve the fundamental issue, which is being able to clean up memory in betterC or @nogc.

There was a discussion last year [1] about adding destructors. According to the spec, class destructors were deprecated in D2, though confusingly I can't write a void delete() {} function, only delete(void*) {}. The delete function (outside of a class) is deprecated in 2.079 though. I'd guess that if deterministic destructors are added to the language, then this() and this() @nogc inheritance becomes much less of an issue.


[1]https://forum.dlang.org/thread/[email protected]?page=1

Reply via email to