From: Josh Cheek Date: 2013-07-24T21:35:36+09:00 Subject: Re: class <=> module --001a1133c37457ec8104e24125fa Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jul 24, 2013 at 1:10 AM, wrote: > > And you forgot to mention: classes can inherit only from a single other > class (a conscious decision by Matz), but you can include many modules. > Seems difficult to unify that in one concept. > > That seems inaccurate to me: C1 = Class.new Object C2 = Class.new C1 C3 = Class.new C2 M1 = Module.new M2 = Module.new C4 = Class.new { include M2, M1 } --001a1133c37457ec8104e24125fa Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jul 24, 2013 at 1:10 AM, <sto.mar@web.de> wrote:

And you forgot to mention: classes can inherit only from a single other
class (a conscious decision by Matz), but you can include many modules.
Seems difficult to unify that in one concept.


That seems inaccurate to me:

C1 =3D Class.new Object
C2 =3D Class.new C1
=
C3 =3D Class.new C2

M1 =3D Module.new
M2 =3D Module.new
C4 =3D Class.new { include M2, M1 }
--001a1133c37457ec8104e24125fa--