From: Tony Arcieri Date: 2012-11-05T06:28:50+09:00 Subject: Re: Support for multiple Inheritance by classes --047d7b603e96d5926e04cdb20de6 Content-Type: text/plain; charset=ISO-8859-1 On Sun, Nov 4, 2012 at 4:49 AM, Ross Konsolebox wrote: > Thanks for the reply. The information is adequate. It's quite > disappointing though since because of that we tend to use class-module > pair format just to make class ready for multiple-inheritance by mixins > through its module; or else we always had to rewrite an existing class > or transfer its contents to a module or the inheriting class itself > every time we make use of the features. > What you're basically saying here is we can get most of the properties of multiple inheritance from mixins. That's good! MI vs. mixins is a philosophical debate. Mixins are a much simpler, more easy-to-reason-about model than true multiple inheritance, IMO. MI brings with it all sorts of odd corner cases, such as the Diamond Inheritance Problem: http://en.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem So what you view as a weakness I see as a strength. > I honestly think that Ruby would have been more enjoyable if it had > supported pure multiple inheritance. If you really want a Ruby-like language with multiple inheritance, might I suggest Python? -- Tony Arcieri --047d7b603e96d5926e04cdb20de6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Sun, Nov 4, 2012 at 4:49 AM, Ross Konsolebox <= lists@ruby-forum.com> wrote:
Thanks for the reply. The information is adequate. It's quite
disappointing though since because of that we tend to use class-module
pair format just to make class ready for multiple-inheritance by mixins
through its module; or else we always had to rewrite an existing class
or transfer its contents to a module or the inheriting class itself
every time we make use of the features.

What you're basically saying here is we can get most of the properties= of multiple inheritance from mixins. That's good!

MI vs. mixins is a philosophical debate. Mixins are a much simpler, mo= re easy-to-reason-about model than true multiple inheritance, IMO. MI bring= s with it all sorts of odd corner cases, such as the Diamond Inheritance Pr= oblem:

http://en.wikipedia.org/wiki/Multiple_inheritanc= e#The_diamond_problem

So what you view as = a weakness I see as a strength.
=A0
I honestly think that Ruby would have been m= ore enjoyable if it had
supported pure multiple inheritance.

If you really want a Ruby-like language with multiple inhe= ritance, might I suggest Python?

--
Ton= y Arcieri

--047d7b603e96d5926e04cdb20de6--