assert(0)
Kapps via Digitalmars-d
digitalmars-d at puremagic.com
Sat Nov 7 22:59:56 PST 2015
On Sunday, 8 November 2015 at 02:51:33 UTC, rsw0x wrote:
> On Saturday, 7 November 2015 at 22:26:53 UTC, David Nadlinger
> wrote:
>> On Saturday, 7 November 2015 at 21:00:58 UTC, Fyodor Ustinov
>> wrote:
>>> We do not have way to in "scope(failure)" or "scope(exit)"
>>> detect - it's "assert" or "throw".
>>
>> Indeed. But the point is that _all_ Errors (of which
>> AssertError is one example) are throwable from `nothrow`
>> functions, and as such might not unwind the stack as you would
>> expect.
>>
>> — David
>
> Dumb question, does nothrow affect codegen?
I don't know if it does right now, but in the future with things
like RC I'd imagine it definitely would (ARC is cheaper if you
can guarantee no exceptions). I feel like there is some cases
right now where it does, but I don't know about that.
More information about the Digitalmars-d
mailing list