On Tuesday, 2 April 2013 at 11:04:06 UTC, Dmitry Olshansky wrote:
02-Apr-2013 14:23, deadalnix пишет:
On Monday, 1 April 2013 at 22:46:49 UTC, Ali Çehreli wrote:
[snip]
Not running cleanup code can transform a small issue in a big disaster
as running can make the problem worse.

I don't think wiring in the language the fact that error don't run the
cleanup code is rather dangerous.

If I had to propose something, it would be to handle error the same way exception are handled, but propose a callback that is ran before the error is throw, in order to allow for complete program stop based on
user logic.

It's exactly what I have in mind as removing the exception handling is something user can't recreate easily. On the other hand "die on first signs of corruption" is as easy as a hook that calls abort before unwind of Error.


It is possible to propose as a default a hook that fails everything and can be overriden.

Time to petition Walter ;)

Reply via email to