A quick test confirms that the new code base has the correct behavior,
by the way.
Ian
On Apr 3, 2008, at 7:14 AM, Leslie P. Polzer wrote:
Consider
(defclass pineapple () ()
(:metaclass persistent-metaclass))
(let ((fruit (make-instance 'pineapple)))
(defclass pineapple ()
((tree :initform 1))
(:metaclass persistent-metaclass))
(slot-value fruit 'tree)))
Will raise unbound slot hell with current code if you have
a lot of instances. Backends signal UNBOUND-SLOT instead
of calling SLOT-UNBOUND (which is the more conformant option
as I see it from CLHS and the MOP spec).
This is also better "do what I mean" behaviour; normally
when you provide an initform for a slot you rely on never
having to deal with unbound slots (at least I do).
Attached is a patch which tests this, changes the backend behaviour
and provides a default for SLOT-UNBOUND that uses the initform
to fill in the slot value.
I tested with BDB46, but can't test the others right now without
too much hassle since I'm not at my main box. Therefore if
possible please apply it, run the other backend tests and tell me
whether they run green for you.
Thanks!
Leslie
<slot-unbound.patch>_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel
_______________________________________________
elephant-devel site list
elephant-devel@common-lisp.net
http://common-lisp.net/mailman/listinfo/elephant-devel