Re: Specializing slot-value-using-class in OpenMCL



Slava Akhmechet wrote:
Pascal Costanza <pc@xxxxxxxxx> writes:

I hope this helps.
Thank you, it helps a lot! I just tried the fix and it works. I only
have one last question. Why are metaclasses are not inherited?

There is no simple and straightforward to way integrate this into CLOS because of multiple inheritance and also forward referenced classes. It would also be conceptually weird, IMHO.

Metaclass of 'b' will be standard-class (which causes problems). I
manually added the metaclass declaration to all relevant class, but is
there a way to simply propagate it from base class?

What seems to be done a lot is (a) to provide your variant of the defclass macro that automatically insert the right :metaclass option for you and sometimes even (b) to shadow cl:defclass. In this way you can ensure that all classes in your system have the same customized metaclass.


Pascal

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/
.



Relevant Pages

  • Strange metaclass behaviour
    ... I think I have discovered a problem in context of ... metaclasses and multiple inheritance in python 2.4, ... or python raises the well known "Metatype conflict among bases" ... the metaclass of EACH of the bases of D does it's work independently ...
    (comp.lang.python)
  • Re: Strange metaclass behaviour
    ... metaclasses and multiple inheritance in python 2.4, ... metaclass: M_B class: B ... from the second base, which has a more derived metaclass, ...
    (comp.lang.python)
  • Re: Specializing slot-value-using-class in OpenMCL
    ... I just tried the fix and it works. ... (defclass a () ... Metaclass of 'b' will be standard-class. ... manually added the metaclass declaration to all relevant class, ...
    (comp.lang.lisp)