Posted on 2008-06-15 20:18:16-07 by blblack in response to 8084
Re: There is no description about what inheritance trees are compatible with C3

Hmm I should add that although rarer, I think you can generate an invalid hierarchy via making it impossible to simultaneously satisfy both monotonicity and local precedence order at the same time. Example:

C isa (D, E) B isa (C, D, E) IF A isa (B, C), A's C3 lin is ABCDE IF A isa (C, B), A's C3 lin is invalid

The issue in the second case is that C3 gaurantees preservation of local precedence order (in other words, the ordering of @ISA won't be violated), so C3 requires on the one hand that C come before B due to the local precedence in A's @ISA, but due to B inheriting C this would violate monotonicity. (CB at the start of A's linearization vs BC at the start of B's linearizaton).

Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.