[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RETURN-FROM inside a FINALLY
re: . . . documentation of the NAMED clause is quite explicit. However,
X3J13/89-004 p. 2-36 says the clause "RETURN <value>" is equivalent to
"DO (RETURN <value>)", and this should be corrected to something like
"DO (RETURN-FROM <loop-name> <value>)" with reference to the NAMED
As I remember it, the equivalence of "RETURN <value>" and
"DO (RETURN <value>)" in the X3J13 proposal was indeed by design,
for the express purpose of rendering the RETURN syntax obsolete
(i.e. why have two forms that are *almost* alike but not exactly,
and to be so close as to be very confusing in the differences).
See X3J13/89-004, p.2-38, where the Loop RETURN syntax is documented
as being supported only for backwards-compatibililty.
See also X3J13/89-004 p. 1-4, which states "Expansion of the LOOP macro
produces an implicit block (named NIL)". The lacuna in this document
is that the discussion of NAMED doesn't make it clear whether it adds
an additional name for RETURN-FROM to use, or whether it retracts the
one named NIL. I think I would prefer the ZetaLisp style that simply
adds block names. The current Lucid implementation dosn't support the
"additive" nature, but then it doesn't claim to be ANSI Common Lisp either.
-- JonL --