[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RETURN-FROM inside a FINALLY
re: I would like to see NAMED kept as a synonym for putting a block
around the loop, since I hate to break old working code unnecessarily.
That was the point of not digging too deeply into "fixing" minor warts
in LOOP -- it has a large existing user-community.
re: I would advocate advising users to use loop-return. I think RETURN
X as a keyword form should be equivalent to (loop-return x). For
LOOP has had a 'loop-finish'; is 'loop-return' something peculiar to
SLOOP? There is a documented, substantial difference between the
macros RETURN and LOOP-FINISH.
re: Since sloop is quite extensible, users can and do add loop macros or
loop maps where nil would not be an appropriate block name. ...
Below are two examples of actual user extensions, where plain return
might be bad.
I'm not sure this is a good thing; "referential transparency" for
plain RETURN still to me seems like a worthy goal. Unfortunately,
the extension mechanism commonly in use for LOOP is quite complex --
so much so that there wasn't time go "fix" it and get agreement
on the design for the upcoming ANSI Common Lisp proposal. Although
SLOOP's is certainly much simpler to understand, I tend to agree
with moon that it fails to incorporate necessary restrictions on
how the pieces of an "iteration" can be joined together.
By the bye, as long as NAMED still exists, why doesn't LOOP-FINISH
admit an optional loop-name word? In multiply-nested loops, how
can code in the innermost one cause the normal "finish" in an outer
one? Anyone got any ideas?
-- JonL --