[armedbear-devel] class-prototype

Blake McBride blake at mcbride.name
Wed Mar 10 22:36:04 UTC 2010

Another example is that as you create sub-classes :allocate :class
variables don't function like regular instance variables in terms of
inheritance.  Correctly defined class variables using metaclasses do.

Blake McBride

On Wed, Mar 10, 2010 at 2:12 PM, Alessio Stalla <alessiostalla at gmail.com> wrote:
> On Wed, Mar 10, 2010 at 8:50 PM, Blake McBride <blake at mcbride.name> wrote:
>> (slot-value (make-instance 'class1) 'cv2)
>> creates an instance.
> Sure, but (slot-value (mop::class-prototype (find-class 'class1))
> 'cv2) does not and still fails with a slot-missing error, which was my
> point.
>> He wanted access to a true class variable,
> no, he wanted to "access class-allocated slot values" in his own
> words. This, in the context of CL, can only mean slots with
> :allocation :class.
>> stored in the class (class1) that was accessible via a class
>> reference.  If that's what he wanted, that's exactly what my code
>> does.
>> My example code does store cv? in class1, not the meta-class.
> It's perfectly fine, but cv? are not class-allocated slots, at least
> not as the CL standard defines them.
> Alessio

More information about the armedbear-devel mailing list