From: Paul Brannan Date: 2002-10-19T02:01:19+09:00 Subject: Re: Interfaces in Ruby On Fri, Oct 18, 2002 at 11:21:17PM +0900, Chris Gehlker wrote: > I consider mixins to be a *form* of MI. I would go so far as to say > that it is the only form that I've actually seen usefully employed even > in C++ code. Your example below and your previous example with is_a > show that it passes the duck test. But even if you want to consider the > it to be "the illusion of multiple inheritance" it's important to > maintain the illusion. Which is why I think it important to use class > clusters as well as mix-ins. I think it's possible to maintain this illusion, provided: 1) No two modules mixed into the same class provide two methods with the same name 2) Mixins do not carry any state (and therefore have no initialize() method); this is a special case of the first requirement. I have not yet decided whether I think it is always a good idea to strictly adhere to these requirements. Paul