I personally think that @nogc should be relaxed to exclude allocating exceptions since there would be no gc allocation other than for exceptional situations. I suspect that having code that relies on exception for main case logic is far worse for performance than any gc overhead anyway and is a pattern everyone knows to avoid.
I was wondering the same myself. I think there would be a lot of
negative side effects to using alternate memory model other than
GC (non-gc could introduce leaks, on stack has potential to be
overwritten). For that reason, I think the only choices that make
sense are that either @nogc functions are also nothrow, or that
phobos has a set of preallocated immutable exceptions that can
can thrown.
- Plan for Exceptions and @nogc? Jonathan Marler via Digitalmars-d
- Re: Plan for Exceptions and @nogc? philippecp via Digitalmars-d
- Re: Plan for Exceptions and @n... Jonathan Marler via Digitalmars-d
- Re: Plan for Exceptions an... Tobias Pankrath via Digitalmars-d
- Re: Plan for Exception... via Digitalmars-d
- Re: Plan for Exce... Matthias Bentrup via Digitalmars-d
- Re: Plan for ... Jonathan Marler via Digitalmars-d
- Re: Plan ... Matthias Bentrup via Digitalmars-d
- Re: Plan ... Tobias Pankrath via Digitalmars-d
- Re: Plan ... Jonathan Marler via Digitalmars-d
- Re: Plan ... Matthias Bentrup via Digitalmars-d
- Re: Plan ... Tobias Pankrath via Digitalmars-d
