From: Intransition Date: 2012-04-20T12:53:33+09:00 Subject: Re: Why must I know whether I extend a class or a module? ------=_Part_879_12853699.1334894011040 Content-Type: multipart/alternative; boundary="----=_Part_880_8700421.1334894011040" ------=_Part_880_8700421.1334894011040 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thursday, April 19, 2012 1:18:05 PM UTC-4, Bartosz Dziewo=C5=84ski wrote= : > > I disagree. You are not supposed to instantiate modules; you do are > supposed to instantiate classes. Even if the difference between the > two is small in your code or in Ruby source, the conceptual gap is > huge. > > No, not really. You just summed it up in one sentence. So instantiate it= =20 as needs be, and don't when you don't. It is how you use it. The forced distinction only serves to take that flexibility away from the= =20 programmer. There are other benefits too in that removing the distinction would allow= =20 auto instantiation, e.g. class Foo::Bar end Would work just fine, even though no `Foo` has been defined separately.=20 This can be especially nice when requiring sub-files. ------=_Part_880_8700421.1334894011040 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Thursday, April 19, 2012 1:18:05 PM UTC-4, Bartosz Dziewo=C5=84ski wrote= :

I disagree. You are not su= pposed to instantiate modules; you do are
supposed to instantiate classe= s. Even if the difference between the
two is small in your code or in Ru= by source, the conceptual gap is
huge.

No, n= ot really. You just summed it up in one sentence. So instantiate it as need= s be, and don't when you don't. It is how you use it.

<= div>The forced distinction only serves to take that flexibility away from t= he programmer.

There are other benefits too in tha= t removing the distinction would allow auto instantiation, e.g.
<= br>
    class Foo::Bar
    end

Would work just fine, even though no `Foo` has been de= fined separately. This can be especially nice when requiring sub-files.

------=_Part_880_8700421.1334894011040-- ------=_Part_879_12853699.1334894011040--