[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLOS: precedence of classes
- To: clisp-list@ma2s2.mathematik.uni-karlsruhe.de, haible@ma2s2.mathematik.uni-karlsruhe.de
- Subject: Re: CLOS: precedence of classes
- From: haible (Bruno Haible)
- Date: Fri, 27 Jan 95 14:37:40 +0100
Joerg Hoehle <hoehle@inf-wiss.uni-konstanz.de> asks:
> what's wrong with the following
> (defclass class1 () ())
> (defclass class2 (class1) ())
> (defclass class3 (class1 class2) ())
The CLOS rules for determining the effective method of a generic function
rely on the fact that if B is a subclass of A, then the class precedence list
of A is contained in the class precedence list of B *in* *that* *order*.
In your example, the CPL of class3 would have to contain (class2 class1)
- because this is the CPL of class2 - and would have to contain
(class3 class1 class2) - because that are the direct superclasses you
specified -. Obviously you can't have both.
Bruno Haible
haible@ma2s2.mathematik.uni-karlsruhe.de