On 10/7/07, Trans <transfire / gmail.com> wrote:
>
>
> On Oct 7, 7:04 pm, "Pat Maddox" <perg... / gmail.com> wrote:
>
> > Well, neither one gave examples, afaik, and I think this whole thing
> > is kind of stupid.  I have a feeling that when these guys post their
> > examples, people will show them much better ways to design their code,
> > so I wanted to get the ball rolling.
>
> Pat, my program is almost as simple as the first example I gave. Since
> I can't inherit from two classes, in the end I just made the
> LinuxApplication a module. If it were a bigger deal I would go ahead
> and make the VideoApplication a module too, just as you describe, but
> it's not that important. It just seemed like a good example to share
> in support of MI because Ruby's SI forced me to make a rather
> arbitrary choice of which gets to be the class and which doesn't.
>
> T.
>
>
>

The point is that if you "have to make an arbitrary choice of which
gets to be the class and which doesn't" then it's likely that neither
one "has" to be the class nor *should* one be the class.  You've
created objects with composable behavior, so you're better off passing
in objects and using delegation, or using modules.

Pat