[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fixing our problems with setf
- To: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- Subject: Re: fixing our problems with setf
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Mon, 28 Sep 87 18:57 EDT
- In-reply-to: <870928-141913-19460@Xerox>
Date: 28 Sep 87 14:18 PDT
From: Danny Bobrow <Bobrow.pa@Xerox.COM>
As with regular functions, associated with any given name you
can have a setf function or a setf macro, but not both. This means
that one does not define a setf function (with defmethod or
defgeneric) and also call defsetf. The mere act of defining the
setf function is enough to tell setf what to do.
Does this mean that if I do a
(defsetf foo ...)
(defun (setf foo) ...)
then the setf macro has been undone. (I hope so).
And similarly in the other direction.
That's the idea. I didn't give a reference to CLtL because, earlier,
I wasn't able to find anything that says what
(defmacro foo ...)
(defun foo ...)
does (nor what the other direction does). I guess this is supposed to
be covered by the second to last sentence on p.67 and the second to last
sentence on p.144, although neither is as clear as I would like.
I changed my file copy of this message to say
Note that defining a setf function after doing a
defsetf or a define-setf-method removes the setf macro, and conversely
defining a setf macro undefines the setf function.