[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to change inheritance of class options?
- To: info-mcl@services.cambridge.apple.com
- Subject: How to change inheritance of class options?
- From: ethan+@pitt.edu (Ethan Benatan)
- Date: Mon, 26 Sep 1994 16:02:31 -0500
- Newsgroups: comp.lang.lisp.mcl
- Organization: University of Pittsburgh
Dear netters,
I've created a metaclass with a particular behaviour, and made classes and
objects using it. Fine. However, when I make a subclass of one of my new
classes, it does not inherit the metaclass affiliation.
To clarify:
? (defclass mc0 (standard-class) ())
#<STANDARD-CLASS MC0>
? (defclass c0 () () (:metaclass mc0))
#<MC0 C0>
? (defclass c1 (c0) ())
#<STANDARD-CLASS C1>
i.e., the class-option slot is not being inherited. That is expected,
described in Steele. However, what I would like to have is
? (defclass c1 (c0) ())
#<MC0 C1>
How can I do this? I have tried messing with the defclass macro (out of my
league) and with make-instance (standard-class) and even default-initargs,
but I can't make sense of it. I have looked in the faq's, the MCL manual,
Steele, and Kiczales and it just makes me feel foolish...
Thanks a lot,
Ethan Benatan
ethan+@pitt.edu