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

Defun inside Let

You two bring up the same point.  What if DEFUN's macro expansion were

	(setf (symbol-function 'foo) #'(lambda arglist . body))

Minor nit: some systems would lose the name of the function inside the
lambda.  All compiled functions have names.

Disagreement with Rees: I think debugging questions should come into the
semantics of things.  Some companies use debuggability and the power of
their debug tools as one of their selling points.  Indeed this isn't
an issue for applications that don't alter functions, but it is
to developers.  Anyway...  

This is no different from defun.  The problem is that there is a top
level functional form, #'(lambda ...) in this case, that the compiler
has to do something with.  Maybe a compiler that sees such a thing in a
non-null lexical environment punts (this doesn't address several other
issues I raised).  Then people will complain, and have to us, that it is
inefficient by generating interpreted code.