[self-interest] Re: A problem about tiebreaker rule in inheritance

Jecel Assumpcao Jr jecel at merlintec.com
Mon Jan 19 21:24:57 UTC 2004

On Saturday 17 January 2004 21:21, cyberbaixing wrote:
> But I am still puzzled. Why the tiebreaker rule doesn't work here?
> Isn't object E sending the message f? Is D right on the path from B
> to E?

We were talking about "B f", not "B g":
> > That is exactly the error you would get when trying "B f"....

"B g" would indeed work in Self 1 or 2 (due to the tiebreaker rule as 
you explained above) but would give you the "ambiguous message" error 
in Self 3 or newer.

> May I understand your illustration like this?
> If C had a method named h which contains f. D doesn't have such a
> method. So when I send a message B f, then based on the tiebreaker
> rule, C f will be chosed. Is it right? If so, the tiebreaker rule
> seems only work between the parents of an object. It doesn't work
> among the grandparents of an object. :p

No, your first interpretation ("E sending f and D is on the path from B 
to E") is correct.

But for "B h" it will result in C sending f and C is on the path from B 
to C. See? Exactly the same rule.

Does anyone reading this *not* think that removing the feature from Self 
was good thing? :-)

-- Jecel

More information about the Self-interest mailing list