1 Dec 2005 11:22
Redefining classes
Michael Weber <michaelw+closer <at> foldr.org>
2005-12-01 10:22:09 GMT
2005-12-01 10:22:09 GMT
Hi,
this mailing list was the closest (hah!) I could find to a (still
active) MOP discussion list. If my question is off-topic, I'd love
to hear where else to go.
I seem not to understand some aspects of class redefinition. Suppose
the following situation:
(defclass foo ()
(...)
(:metaclass foo-metaclass))
(defclass foo-1 (foo)
(...)
(:metaclass foo-metaclass))
If I redefine FOO later on to add or remove slots, it gets
reinitialized, and I have
(defmethod shared-initialize :after ((class foo-metaclass) slot-names
&rest initargs
&key &allow-other-keys)
...)
which recalculates some slot-based information for FOO then.
However, FOO-1 is left unchanged, which surprised me a little. I
would have expected that it gets reinitialized as well, thus giving
the above initializer a chance to recalculate information for FOO-1,
(Continue reading)
RSS Feed