ctrl+c and destructors

Andrej Mitrovic andrej.mitrovich at gmail.com
Thu Oct 3 17:55:36 PDT 2013


On 10/4/13, Walter Bright <newshound2 at digitalmars.com> wrote:
> Continuing program execution after it failed due to programming bugs is just
> a bad, bad, bad idea, and it needs to die.

Then why did you introduce the Error exception type into the language
in the first place? I mean why would you let exceptions propagate up
the call stack if the state of the program is seriously compromised?
Why not just call the system's exit() function?

If nobody up the call stack could do anything useful, then there's no
point in walking up the call stack. And yet we have Error that does
exactly that.

What I'm saying is the act of throwing an Error itself is an act of
continuing program execution after a serious failure. And here you are
arguing against it.


More information about the Digitalmars-d mailing list