[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DEFUN inside of LET

    The meaning of DEFUN inside of LET has been discussed at least
twice before on thie mailing list.  Each time some people say that
they aren't sure whether it is required to work, and the rest of the
people say that "The U.S. will look pretty wimpy in ISO standardization
if DEFUN doesn't work inside of LET."

    If you have a lexical Lisp, DEFUN with a non-null environment will
work without any major effort.  I can't think of any reason for
arbitrarily making the environment for DEFUN null, and I can think of
good reasons for not doing so.  If you want a definition in a null
environment, you can always put the definition in a null environment.

    It is my opinion that the notion of a top-level form doesn't make
sense in a lexical Lisp.  This issue definitely needs to be clarified.
I think that passage in CLTL about top-level forms not being well
defined in non-top-level contexts should be flushed.  It should be
replaced with text describing what the forms do.  This opinion is
based on the assumption that it is reasonable to make definitions in a
non-null environment.  Such definitions are clearly not in a top-level
context, so the semantics of definitions in non-top-level contexts
must be defined.

    As to whether DEFUN makes a local definition, I would say no.  It
seems to me that the semantics of defun is to change the global
function definition, no matter where it appears.  Common Lisp has no
notion of a block which implicitly gloms onto definitions in its body.
If you want to make a local definition, you use a binding form.


P.S. Rambo for technical committee!