[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Defun inside Let
Date: Thu, 30 Jan 1986 20:13 EST
From: Rob MacLachlan <RAM@C.CS.CMU.EDU>
I don't have answers for any of those. My personal feeling is
that DEFUN that requires a non-null lexical environment, such as
created by LET, is a timebomb ticking quickly.
I think many of the cited problems are contingent in the assumption
that COMPILE lets you do everything you want to do. You are bothered
mostly by programming environment issues which Common Lisp mostly
doesn't address.
That's right, I am bothered by programming environment. That isn't
necessarily an issue to the people who use the code, but it sure is an
issue to those that write it and have to debug it. [Actually, the users
never come into it; for all they know the program they are running is
written in Ada. This is only an issue for developers.] I agree it is
probably not in CL's domain to address these issues, but it shouldn't
prohibit it. Maybe another example?
(let ((counter 0))
(defun hairy-function-counter ()
counter)
(defun hairy-function (arg1 ...)
(incf counter)
...big-and-hairy-compuation-bound-to-get-
called-a-lot-and-have-bugs-that-need-fixing...))
Why, during my debugging cycle, should I be forced to have the counter
reset to 0 each time I need to change hairy-function?
Date: Thu, 30 Jan 86 13:37:13 pst
From: mips!escargot.earl@glacier (Earl Killian)
No one has suggested that making DEFUN inside of LET not work is the
right thing (people have suggested that it may not be required by the
current wording of the Common Lisp manual). If someone feels that
DEFUN inside of LET shouldn't work, they ought to speak up!
I have reservations.