From: Robert
Subject: newbie question about MI in CLOS
Date: 
Message-ID: <7a1ed37.0105311837.7f346d56@posting.google.com>
After reading about the class precedence algorithm in the book "Lisp" by
Winston and Horn, I thought of the case:
 (defclass b () (...))
 (defclass c (b) (...))
 (defclass a (b c) (...)) which I thought would break the algorithm. Sure
enough, when I ran this on CLISP, I got an error ("inconsistent precedence
graph: cycle...").

  Could someone please explain why this is so evil (or why one would never
want to do it), or point me towards an article or FAQ explaining why it was
decided upon to implement CLOS this way? I've looked around a bit but have had
no luck (ANSI Common Lisp by Graham doesn't even have the correct algorithm).
  Thanks,
  Robert Fisher
From: MeanGene
Subject: Re: newbie question about MI in CLOS
Date: 
Message-ID: <jkER6.41724$aW5.481195@dfw-read.news.verio.net>
>>>>> On 31 May 2001 19:37:33 -0700, Robert <·········@aol.com> wrote:
> After reading about the class precedence algorithm in the book "Lisp" by
> Winston and Horn, I thought of the case:
>  (defclass b () (...))
>  (defclass c (b) (...))
>  (defclass a (b c) (...)) which I thought would break the algorithm. Sure
> enough, when I ran this on CLISP, I got an error ("inconsistent precedence
> graph: cycle...").

The problem here is called "ambiguous inheritance."

Suppose, class b defines a method called foo-func, and class c redefines it.
Which foo-func should class a adhere to?

--ET.