From: "QUEISSER,ANDREW (HP-Corvallis,ex1)" Date: 2002-04-03T05:03:35+09:00 Subject: RE: Mixins vs. Multiple Inheritance A typical mixin module doesn't define a class. In C++ two classes foo and bar might be fully defined, non-abstract classes you use in your program. Later you may decide to use foo and bar as bases for baz. Ruby mixins are different, they tend to define some functions in terms of other functions found in the class they're mixed into. They can be almost like base classes as they can define instance variables that are injected into the class they're mixed into (unless I misunderstand something here.) Andrew Queisser > -----Original Message----- > From: Jason Voegele [mailto:jason@jvoegele.com] > Sent: Tuesday, April 02, 2002 11:48 AM > To: ruby-talk@ruby-lang.org > Subject: Mixins vs. Multiple Inheritance > > > Given that including a module M into a class C > > * Mixes in all methods from M into C > * Results in C#is_a?(M) to be true > * Does not resolve name collisions > > how is mixing in multiple modules really any different from standard > multiple inheritance? > > I suspect that it has something to do with repeated (i.e. "diamond") > inheritance structures, but I don't see how modules resolve > this issue > either. > > What are your thoughts? > > Jason Voegele > > >