On Wed, 03 Dec 2008 14:47:14 -0500, Robert Fraser <[EMAIL PROTECTED]> wrote:
Robert Jacques wrote:
2) One can still catch an error if need be.

Yeah, I'm not sure what I was thinking here.

Not if the function is nothrow, since the function never sets up an exception handling frame (that's the point of this topic, AFAICT).

Okay, while we've been talking about OutOfMemoryError there's also RangeError, AssertError, FinalizeError and SwitchError and not allowing array indexing, contract programming or switches inside a nothrow function drastically reduces their usefulness (more so than allocation, in my opinion). So at least in debug mode, the handling frame (I think) exists in order to support RangeError and AssertError errors. However, SwitchError and HiddenFuncError occur in release code, so I'm not sure if nothrow functions will not have some error handling method. (I think FinalizeError is related to allocation and therefore OutOfMemoryError)

PS. I would class removing the exception handling frame as an optimization which is separate from the nothrow language contract feature.

Reply via email to