[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CLOS: precedence of classes
- To: email@example.com
- Subject: Re: CLOS: precedence of classes
- From: Pascal POIZAT - DEA Info <firstname.lastname@example.org>
- Date: Fri, 27 Jan 1995 14:22:44 +0100
If you do
(inheritance links) then CLOS generates a cycling precedence list for c3.
Don't forget that it will add an extra link between c1->c2 thus making (c1,c2) a cycle.
c2 <--- c3
this is what you did.
Then CLOS modifies this to obtain:
/\ | /\
| \/ |
c2 <-- c3
and here there is a cycle between c1 and c2.
This is because you specified c1 before c2 in c3's inheritance list.
When you say that c inherits from c1 c2 c3 ... ci ci+1 ... cn
then you create implicit (for CLOS) links between c1 and c2, c2 and c3, ..., ci and ci+1,
cn-1 and cn.
Just try modifying class3 by making it like this:
(defclass class3 (class2 class1) ()) it should work.
DEA Informatique, Nantes, France
(pre PhD year in Computer Science)
Applying Rewriting to Object Specifications using CLOS.
PS: thanks for mailing me the place where to find the last version of CLISP-HIGH.
PS2: I mailed this directly to you, since if you receive hundreds of answers you
could join them and then mail them to the mailing-list.