From: "BrĂ¡ulio Bhavamitra" Date: 2013-07-19T06:34:41+09:00 Subject: Re: class <=> module --001a11c373602c9f5704e1cffa1d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, Jul 18, 2013 at 11:02 AM, Br=C3=A1ulio Bhavamitra wrote: > Hello all, > > Recently I got the error described at > https://www.ruby-forum.com/topic/1506818, > which shows that classes can't be used to scope another classes or module= s. > > Then I started thinking: why two concepts, class and module, instead of > only one? > > Classes heritage, a feature modules don't have, can be done with include > and extend togheter. So we would need another method that does both inclu= de > and extend (call it inherit). Classes can't be used to define a scope. > Modules can't be instanciated, but classes can. > > So why not have only one concept that does both class and modules? You ma= y > call this unified concept either class or a module, I'll call it X. > > X is capable of extending, including and inheriting, does scoping and be > instanciated. > > How does it sound? > > regards, > br=C3=A1ulio > > -- > "Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua > ideologia. Morra por sua ideologia" P.R. Sarkar > > EITA - Educa=C3=A7=C3=A3o, Informa=C3=A7=C3=A3o e Tecnologias para Autoge= st=C3=A3o > http://cirandas.net/brauliobo > http://eita.org.br > --=20 "Lute pela sua ideologia. Seja um com sua ideologia. Viva pela sua ideologia. Morra por sua ideologia" P.R. Sarkar EITA - Educa=C3=A7=C3=A3o, Informa=C3=A7=C3=A3o e Tecnologias para Autogest= =C3=A3o http://cirandas.net/brauliobo http://eita.org.br --001a11c373602c9f5704e1cffa1d Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Thu, Jul 18, 2013 at 11:02 AM, Br=C3=A1ulio Bhavamitra <braulio@eita.org.br> wrote:
Hello all,

Recently I got the error described at=C2=A0https://www.ruby-forum.com/topic/= 1506818,
which shows that classes can't be used to scope another classes or= modules.

Then I started thinking: why two concepts, class and mo= dule, instead of only one?

Classes=C2=A0heritage, = a feature modules don't have, can be done with include and extend toghe= ter. So we would need another method that does both include and extend (cal= l it inherit). Classes can't be used to define a scope.
Modules can't be instanciated, but classes can.

So why not have only one concept that does both class and modules? Y= ou may call this unified concept either class or a module, I'll call it= X.

X is capable of extending, including and inheriting, do= es scoping and be instanciated.

How does it sound?=

regards,
br=C3=A1ulio

--
"Lute pela sua ideologia. Seja um com sua ideologia. = Viva pela sua ideologia. Morra por sua ideologia" P.R. Sarkar

E= ITA - Educa=C3=A7=C3=A3o, Informa=C3=A7=C3=A3o e Tecnologias para Autogest= =C3=A3o
http= ://cirandas.net/brauliobo
http://eita.org.br



--
"Lute p= ela sua ideologia. Seja um com sua ideologia. Viva pela sua ideologia. Morr= a por sua ideologia" P.R. Sarkar

EITA - Educa=C3=A7=C3=A3o, Inf= orma=C3=A7=C3=A3o e Tecnologias para Autogest=C3=A3o
http://cirandas= .net/brauliobo
http= ://eita.org.br
--001a11c373602c9f5704e1cffa1d--