[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- To: Benson at UTAH-20
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Tue, 09 Nov 1982 00:53:00 -0000
- Cc: Common-Lisp at SU-AI
In most current Lisp implementations, one cannot write
(SETF (GET 'FOO 'BAR) #'(LAMBDA ...))
unless he doesn't mind #'(LAMBDA ...) not being compiled. Toplevel
non-definitional forms are not compiled in Maclisp or LispM, for example.
Hence, without the existence of (DEFUN (:PROPERTY FOO BAR) ...), one
would have to write
(DEFUN something ...)
(SETF (GET 'FOO 'BAR) #'something)
which is a bit tedious.
I don't know if Common-Lisp has taken a stand on whether toplevel LAMBDAs
like this one get compiled. Discussion came up about it before. It's related
to the (PROGN 'COMPILE ...) issue and should probably be defined. I'm
personally in favor of avoiding a (PROGN 'COMPILE ...) primitive
and compiling all toplevel forms. In such case, the SETF you show would be
technically correct, but it lacks the declarative appeal of being integrated
into a DEFUN.
The question, I guess, comes down to whether you think of what you're
doing as defining a function with a complex name or creating an
anonymous function and putting it in a complex place. I think there is
need for both and the two issues should be kept separate.