[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defun inside Let
- To: Jonathan A Rees <JAR@MC.LCS.MIT.EDU>, Steven Haflich <smh@MIT-EMS.ARPA>
- Subject: Defun inside Let
- From: David C. Plummer <DCP@SCRC-QUABBIN.ARPA>
- Date: Thu, 30 Jan 86 18:10 EST
- Cc: DCP@SCRC-QUABBIN.ARPA, JAR%MC.LCS.MIT.EDU@MIT-EMS.ARPA, NGALL%G.BBN.COM@MIT-EMS.ARPA, common-lisp@SU-AI.ARPA
- In-reply-to: <[MC.LCS.MIT.EDU].802081.860130.JAR0>, <8601302218.AA10164@mit-ems.ARPA>
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.