From: Dave Thomas Date: 2003-12-03T23:51:22+09:00 Subject: Re: mixin vs. multiple inheritence On Dec 3, 2003, at 5:46, Christoph wrote: > T. Onoma wrote: > ... >> >> How are mix-in more restricted than multiple inheritance? > > There is non such thing as a diamond shape > mixin graph ... > Actually, that's not really true. module A; end module B; include A; end module C; include A; end class D; include B; include C; end You can build as complicated a mixin graph as you can a MI graph. The difference is that because mixins are modules, they don't have their own state, but instead parasitically use the state of the class into which they are mixed. This eliminates the underlying issue with MI, where there may be two _instances_ (logically) of the class at the top of the diamond. Cheers Dave