Program logic bugs vs input/environmental errors
via Digitalmars-d
digitalmars-d at puremagic.com
Thu Oct 9 11:32:53 PDT 2014
On Thursday, 9 October 2014 at 17:31:32 UTC, Dicebot wrote:
> On Thursday, 9 October 2014 at 16:33:53 UTC, Johannes Pfau
> wrote:
>> I think Walter sometimes suggested that it would be valid for a
>> compiler to not unwind Errors at all (in release mode), but
>> simply kill
>> the program and dump a error message. This would finally allow
>> us to
>> optimize nothrow functions.
>
> I think this is reasonable in general but as long as assert
> throws Error and assert is encouraged to be used in unittest
> blocks such implementation would mark compiler as unusable for
> me.
Can it simply skip unwinding up to the next not-nothrow function?
I.e. destructors of objects (and finally/scope(exit)) inside
`nothrow` functions will not be executed, but unwinding will
continue as normal at the first function up the call stack that
supports it?
Would this work for both GDC and LDC? If yes, your unittest
framework will probably continue to work as is.
More information about the Digitalmars-d
mailing list