[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: DECLARE SPECIAL Considered Confusing
Date: Mon, 14 Jul 86 16:46 EDT
From: Robert W. Kerns <RWK@YUKON.SCRC.Symbolics.COM>
You forgot DEFUN and DEFMACRO (and similar top-level definers).
Those, I believe, would be unchanged by your proposal, no?
Those are macros whose behaviour should be understood in terms of the
special forms into which they are defined to expand. It is my opinion
that the language spec should include a complete example macro
definition of all macros so as to make their semantics absolutely clear.
For example, I believe that the basic semantics of DEFUN are as follows:
(defmacro defun (name args &body body decls doc)
`(progn
(setf (symbol-function ,name)
`(lambda ,args ,@decls (block ,name ,@body)))
(setf (documentation ,name 'function)
doc)))
It is thus made clear that the scope of the declarations in DEFUN is
precisely as in an anonymous LAMBDA, just as they should be. It also,
by the way, makes it clear what a non-top-level DEFUN means...
Pavel
PS- Sorry, I used the parse-body feature of &body that hasn't yet been
approved, so shoot me.