[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lazy catch behaviour
From: |
Neil Jerram |
Subject: |
Re: Lazy catch behaviour |
Date: |
19 May 2001 00:07:18 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
>>>>> "Marius" == Marius Vollmer <address@hidden> writes:
Marius> `lazy-catch' is a bit wierd, true. If we can find another
Marius> mechanism that does its job in a cleaner way, we should
Marius> probably replace it. In the mean-time, we should make
Marius> sure that `throw' does not return, ever. If `throw' does
Marius> return, it should throw an error.
I don't have time right now to work out how to do this in the code.
But I propose adding this note to the reference manual documentation
for lazy-catch:
@strong{Note:} It is debatable whether the second point is actually a
desirable feature, as it makes the local behaviour of a @code{throw}
expression dependent upon the type of catch (normal or lazy) that
handles it. Consequently, the returnability of @code{lazy-catch} may be
removed in a future Guile release, and it would be unwise for Scheme
programs to rely on this characteristic.
Does that sound OK? (The "second point" referenced says "If the
handler returns normally --- i.e. does not @emph{itself} throw an
exception --- then the @code{throw} expression returns normally to its
caller with the handler's value.")
Neil