[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with :METACLASS option
- To: kempf%hplabsc@hplabs.HP.COM
- Subject: Re: Problems with :METACLASS option
- From: Gregor.pa@Xerox.COM
- Date: 20 May 87 16:07 PDT
- Cc: commonloops.pa@Xerox.COM
- In-reply-to: Jim Kempf <kempf%hplabsc@hplabs.HP.COM>'s message of Tue, 19 May 87 10:02:22 pdt
Date: Tue, 19 May 87 10:02:22 pdt
From: Jim Kempf <kempf%hplabsc@hplabs.HP.COM>
The :METACLASS option to DEFCLASS is causing some circularity
problems. Supposing I want to have a class at the top of the class
hierarchy, but the metaclass is not ESSENTIAL-CLASS (or
STANDARD-CLASS in the CLOS spec). Then, after defining the
metaclass, I might try to define it as:
(defclass top-class () () (:metaclass new-metaclass))
But this gives me a meta/super incompatibility error in
CHECK-SUPER-METACLASS-COMPATIBILITY, because class OBJECT is
included by default, even if the inheritance list is NIL (as in
this case).
Well, there are at least two ways to fix this.
1. put a method on class-default-includes for your new metaclass that
will cause your class not to include OBJECT when it has no other
includes. Of course you will probably want to include T, at which point
you will get a similar error, then you can.
2.a put a method on CHECK-SUPER-METACLASS-COMPATIBILITY that says that
OBJECT is an OK super.
2.b put a method on CHECK-SUPER-METACLASS-COMPATIBILITY that says that
CLASS (soon to be standard-class) is an OK super-metaclass.