[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Blown Away Slot Initform
- To: info-mcl@digitool.com
- Subject: Blown Away Slot Initform
- From: paul_hasse@NSDGATE3.nsd.fmc.com (paul hasse)
- Date: Mon, 20 Feb 95 21:16:59 CDT
- Encoding: 584 Text
- Sender: owner-info-mcl@digitool.com
Does anybody know if slot initforms can be altered within the class definition
by side effect, i.e. destructively altering an instance of the class. Does
Steel describe this behavior (I cannot find the reference).
As an example, the following code returns => TED
(progn
(defclass person () ((x :initform '(1 2 3))))
(setf x (make-instance 'person))
(setf (car (slot-value x 'x)) 'ted)
(setf y (make-instance 'person))
(car (slot-value y 'x)))
Is this a bug in MCL or is this the expected behavior (inquiring minds want to
know).
Thanks in advance.