Proposal: Exceptions and @nogc
Jack Stouffer via Digitalmars-d
digitalmars-d at puremagic.com
Wed Apr 5 07:21:20 PDT 2017
On Wednesday, 5 April 2017 at 09:51:16 UTC, Walter Bright wrote:
> Much of Phobos has been redone to not assume/require the GC. A
> glaring exception (!) is when Exceptions are thrown, which is
> why we're looking for a solution.
Much, but not most. Dynamic arrays, AAs, closures, and all
classes are still heavily used in Phobos. More than half of all
the modules in Phobos rely on GC.
Again: making throwing exceptions @nogc WILL make a small number
of the overall currently allocating functions @nogc. It will NOT
make the majority of Phobos @nogc and it doesn't come close to
the main problem already stated in my other comments.
You're adding in a confusing special case for a small piece of
the overall whole and missing the forrest for the trees.
More information about the Digitalmars-d
mailing list