More exception classes into Phobos?

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Thu Mar 23 02:52:03 PDT 2017


On Thursday, March 23, 2017 22:39:14 rikki cattermole via Digitalmars-d 
wrote:
> Does anybody know if we've solved @nogc exceptions? (I haven't needed
> them). If we haven't we should hold off on this.

If we have any hope of solving that, it's going to depend on the built-in
reference counting that hasn't been implemented yet (I believe that it's on
hold while Walter works on sorting out @safe issues that need to be fixed
first). Other than that, AFAIK, the only solutions involve either
pre-allocating exceptions (which works for some cases but is often
counter-productive as far as error-reporting goes) or allocating with malloc
(and that only works in isolated circumstances where everyone working on the
code is well aware of the fact that the exceptions are being allocated via
malloc and know how to handle that in that code base; otherwise, it's just
going to cause memory leaks and @safety problems).

- Jonathan M Davis



More information about the Digitalmars-d mailing list