-----Original Message----- From: squeak-dev-admin@lists.squeakfoundation.org [mailto:squeak-dev- admin@lists.squeakfoundation.org] On Behalf Of Lex Spoon Sent: Tuesday, February 26, 2002 12:33 PM To: squeak-dev@lists.squeakfoundation.org Subject: RE: Modules and class... [ a off-topic question ?]
I think that it is mostly lack of experience in this space that is
doing
the talking here amongst Squeak folks.
I think my intuitive decomposition of classes and modules may be
similar
to others', so let me toss it out.
A class primarily declares a number of instance variables, and holds a number of methods, and can be instantiated. It can also define variables in a local scope, but that's secondary and not even
necessary
if we have modules.
You've described a constructor, not a class.
A module primarily defines variables in a local scope. Theoretically, it could have instance variables, could have methods, and could even allow instantiation. These abilities are not only secondary, but
might
not be necessary at all.
You've described a namespace, not a module.
-- Dave S. [www.smallscript.org]
Looking at this, there isn't much of an intersection in the common
uses.
Why don't we just say that a class *has* a module (to hold class variables), and leave it at that?
Of course, I haven't implemented a Smalltalk modules system and developed it over 10 years, so I may be being naive here. I just
worry
about equating ideas just because their implementations share some features. Conceptually the two things are different, and thus implementing them as the same thing is bothersome. This is the core
of
the language, so let's keep it as clean as we can!
-Lex