yebblies <> changed:

           What    |Removed                     |Added
           Platform|Other                       |All

--- Comment #9 from yebblies <> 2012-02-01 19:18:47 EST ---
The problem with just letting it catch all throwables in safe code is that it
is _not_ safe, so until we have a better solution I think forcing the user to
mark their function as @trusted is actually correct.

Exceptions thrown in contracts are supposed to be recoverable, which makes
AssertError (or any error) inappropriate.  But if asserts inside contracts are
changed to throw something else, called functions may still throw AssertErrors
that were intended to be caught.

On the other hand, an assert hit inside a contract could easily mean the
program is in an invalid state, and completely break the guarantees of @safe.

I think the best option is to make asserts in contracts throw something else,
despite the downsides.

I understand you would like to undo the regression, but I think re-opening this
hole in @safe is much worse than the current state, especially considering how
trivial the workaround is.

If you know how you would like the solution to look I'm happy to implement it.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to