Proposal: Exceptions and @nogc
Jonathan M Davis via Digitalmars-d
digitalmars-d at puremagic.com
Mon Apr 3 14:31:39 PDT 2017
On Monday, April 03, 2017 14:00:53 Walter Bright via Digitalmars-d wrote:
> The idea of this proposal is to make a nogc program much more achievable.
> Currently, in order to not link with the GC, you can't use exceptions (or
> at least not in a memory safe manner). A solution without memory safety
> is not acceptable.
Yeah, the simple fact that you can't allocate exceptions in @nogc code is
crippling to @nogc, and a lot of code that could otherwise be @nogc can't be
because of exceptions - though the exception message poses a similar problem
(especially if you'd normally construct it with format), and I don't know
how you get around that other than not using anything more informative than
string literals. Unless I missed something, this proposal seems to ignore
that particular issue.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list