Modules and class... [ a off-topic question ?]

Chris Becker chb99 at msn.com
Mon Feb 25 17:22:56 UTC 2002


I completely agree with Göran here, as well as with Les.

If "a module should be a class", as David Simmons suggests, why not just
create a class called Module that inherits from Class? That's what you would
do in a pure OO environment like Squeak in order to achieve that desired
result.

But clearly, from David's examples, Smallscript is *not* a pure OO
environment. Smallscript looks very cannibalized. Functions vs. methods vs.
messages, {braces} and [brackets], multiple meanings for (.), interfaces
that are classes, modules that are classes, classes that are namespaces ...
I don't see how all this is going to help *Squeak*.

Most of the people who actively participate on this mailing list are very
passionate about keeping Squeak "pure". They don't want to turn it into a
hobgoblin of syntactic variation and confusing concepts. They merely want to
incrementally improve on a very simple and beautiful, yet powerful, design.
(And hats off to Dan Ingalls who has truly "loved his baby" all these years,
nurturing it like a father does his child ... sorry ... getting emotional
now ... sniff-sniff.)

It's so easy to take a machete to something, hacking and slashing parts off
and sewing them back together to create a Frankenstein monster. It's much
more difficult to thoughtfully teach an evolving young mind (Squeak,
formerly Smalltalk-80) new concepts without having it grow up confused with
an identity crisis.

Confused children make a confused world. The world is confused enough as it
is. Let's not confuse Squeak.

Chris Becker


-----Original Message-----
From:	squeak-dev-admin at lists.squeakfoundation.org
[mailto:squeak-dev-admin at lists.squeakfoundation.org] On Behalf Of
goran.hultgren at bluefish.se
Sent:	Monday, February 25, 2002 4:40 AM
To:	squeak-dev at lists.squeakfoundation.org
Subject:	Re: Modules and class... [ a off-topic question ?]

I read your thread and even though you both are much, MUCH more
experienced in these areas I need to speak up. :-)

David certainly might have a point in that you CAN (perhaps with some
mindbending IMHO) unify classes and modules - obviously he has done it.
:-) But just because you CAN do it... ;-)

To me it feels rather "contrived" (is that the right word?). As Les
points out there are numerous differences and it doesn't feel obvious at
all (to me).

The most naive view of a module is that it is a collection of classes
more or less self contained - it is a grouping of classes. So...
following my naive reasoning (which I think is a great way of testing if
these conceptual things feels natural) - if a module is a class, and a
module is a collection of classes, then a class is a collection of
classes. BEEP. That doesn't sound right to me.

Ok, perhaps I did that wrong. Perhaps a module is "a kind of" class, and
I can not draw the conclusion that all classes are modules.

I still think this smells like "over unification" or something. No
offense intended. :-) :-)

regards, Göran

PS. The Module system in Squeak OTOH feels nice to me - "A module is an
instance of the class Module and it holds classes and submodules etc."
:-) :-) DS





More information about the Squeak-dev mailing list