2008/11/23 Ludovic Courtès <[EMAIL PROTECTED]>:
>
> Exactly, thanks!  Now, I was actually using SRFI-34's
> `with-exception-handler', which I expected to behave like
> `with-throw-handler'.  Should we change `with-exception-handler' to use
> `with-throw-handler' instead of `lazy-catch'?

Yes, I think we should, since SRFI-34 says that "The handler is called
in the dynamic environment of the call to raise, except that the
current exception handler is that in place for the call to
with-exception-handler that installed the handler being called."

(I recall now being aware of this as a discrepancy at the time I wrote
(srfi srfi-34) using lazy-catch; but I let it slip because we didn't
have with-throw-handler at that time, and because none of the SRFI-34
reference test cases at that time differentiated between unwinding or
not unwinding the dynamic context, hence the lazy-catch implemented
passed all of those cases.)

Could you make that change?

> (In fact, I don't understand when the `lazy-catch' semantics could be
> preferable over the `with-throw-handler' semantics'.)

I agree.  To be fair, there is a slight messiness in the
with-throw-handler semantics, because of the handler context being
unwound before the handler is called, but there is a lot more
messiness in the lazy-catch semantics.

Regards,
       Neil


Reply via email to