[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: raise should not change continuation



>>>>> "Marc" == Marc Feeley <feeley@xxxxxxxxxxxxxxxx> writes:

Marc> In SRFI 18 the exception handler must be called with the same
Marc> continuation as "raise" (and consequently the same dynamic
Marc> environment and exception handler).
>> 
>> Why is this inconsistent?  SRFI 34 doesn't specify a behavior
>> different from that of SRFI 18.  It merely leaves part of the behavior
>> unspecified.

Marc> No, SRFI 34 says:

Marc>    (raise obj) Invokes the current exception handler on obj . The
Marc>    handler is called in the dynamic environment of the call to raise ,

Marc>    **** except that the current exception handler is that in place for
Marc>    the call to with-exception-handler that installed the handler being
Marc>    called. The handler's continuation is otherwise unspecified. ****

Marc> According to this, the continuation of the exception handler can't
Marc> be the ***same*** as the continuation of raise because the dynamic
Marc> environment is different (recall that the dynamic environment is
Marc> part of the continuation).

The text in SRFI 18 you're referring to talks about primitives.
SRFI 34 doesn't say anything about how primitives raise exceptions.

The specifications of RAISE and WITH-EXCEPTION-HANDLER in SRFI 18
don't say anything about the dynamic environment or the continuation
of the exception handler.  The single example given doesn't constrain
this further, either.

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla