[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
LOOP and white pages.
- To: common-lisp at SU-AI
- Subject: LOOP and white pages.
- From: Rod Brooks <ROD at SU-AI>
- Date: Mon, 30 Aug 1982 13:14:00 -0000
(reply to "BROOKS@MIT-OZ"@MIT-MC)
Just so Scott doesn't get the feeling that he is the only one who doesn't want
LOOP in the white pages, here are some reasons that I am against it.
I haven't looked at the complete new proposal, but in MOON's MACRO example:
(DEFUN MACROEXPAND (FORM &AUX CHANGED)
"Keep expanding the form until it is not a macro-invocation"
(LOOP (MULTIPLE-VALUE (FORM CHANGED) (MACROEXPAND-1 FORM))
(IF (NOT CHANGED) (RETURN FORM))))
one sees a fundamentally new scoping system in action. In all other binding
mechanisms (e.g. LET, DO, MULTIPLE-VALUE-BIND, DEFUN and even PROG with init values)
the CAR of a form identifies the form type as one which will do binding which
will remain in effect only within that form, and at the same time says where
in the form one can find the variables and what they will be bound to.
In this example MULTIPLE-VALUE says where the variable names and the things
that they will be bound to are (syntactically), but the scope of those
bindings is determined by a context outside of the form with MULTIPLE-VALUE
as its CAR. On the other hand while the symbol LOOP determines the scope of
the bindings (in the example at least) it doesn't determine the syntactic location
of the variables and what they get bound to.
While JLK is right that it is possible to write horrible code with DO, I don't
agree that we have to jump in *now* with another mechanism, especially when that
mechanism introduces radically new (and I believe bad) scoping rules. Lets leave
LOOP in the yellow pages for now.