[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some invariants
- To: Common-Lisp-Object-System@SAIL.STANFORD.EDU
- Subject: Re: Some invariants
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Wed, 7 Jan 87 20:56 EST
- In-reply-to: <870107-172718-6156@Xerox>
Date: 7 Jan 87 17:28 PST
From: Masinter.pa@Xerox.COM
That make-instance always creates new structure is a very useful
property; for example, it means that
(let ((x (make-instance 'foo)))
(setf (foo-slot x) 3)
x)
has no global side effects.
Not so. Someone might have done
(defmethod-setf foo-slot :before ((foo foo)) (new-value)
(push (list foo 'slot new-value) *mumble*))
Accessors are generic, and therefore can do anything.