MenTaLguY wrote:
> On Sat, 6 Oct 2007 06:06:45 +0900, Trans <transfire / gmail.com> wrote:
>> I think it would be a good idea to really give some deep consideration
>> as to why modules and classes are distinct in Ruby. Why?
> 
> One reason is to avoid ambiguity about object representations.  Let's
> say that instance methods of class A assume one representation, and the
> instance methods of class B assume another, incompatible, representation
> [1].
...
> [1] In Ruby 1.8, representations can be incompatible because they either
>     used instance variables with conflicting names, or because they are
>     of different RBasic types -- e.g. T_STRUCT versus T_DATA

Isn't ivar conflict an argument against mixins just as much as it is an 
argument against MI?

Solutions to this have been discussed...

T_STRUCT vs T_DATA is still a problem for MI, of course. (As is T_DATA 
vs T_DATA when the underlying C types are different.)

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407