Ara.T.Howard wrote:
> On Fri, 29 Jul 2005, Jim Weirich wrote:
> 
>>> did you run this?  this is most defintely __not__ the diamond problem 
>>> - it
>>> is strictly a tree:
>>
>>
>>> From my point of view, it looks like a diamond include structure, i.e.
>>
>>
>>     A
>>    / \
>>   B   C
>>    \ /
>>     D
>>
>> Ruby does linearizes the method resolution order to D,C,B,A.
> 
> 
> right - we are saying the same thing - the diamond is reduced to a line 
> - ergo
> no 'diamond' problem - it's avoided by requiring the programmer to order 
> the
> line via 'include'.

By your logic, C++ and Python don't have the diamond problem either. 
Both of those languages have well defined ways in which the method to 
call is chosen, which have to do with the order in which the programmer 
writes things.  So from the compiler's point of view, there is never a 
diamond problem, unless you had a language specification which didn't 
define any rules for resolving the issue.  The "diamond problem" is a 
problem for humans, who may not always remember, or take into account, 
the language's rules for choosing which method to call, so in that sense 
Ruby's module include feature introduces exactly the same "diamond 
problem" that multiple inheritence introduces into other languages.

Adam