Musings about modularity and programming in the large

Jason Johnson jason.johnson.081 at
Tue Jan 22 20:06:48 UTC 2008

On Jan 22, 2008 8:24 PM, stephane ducasse <stephane.ducasse at> wrote:
> I think that this is interesting to look at other lnagages. Now
> unifying class and modules
> was never something I was found of. I'm not sure that we gain
> something besides confusion.
> A module could be "somehow a bit " polymorphic enough to be put in a
> system dictionary
> if you need but a class = factory of objects, a modules = scoped group
> of classes is a nice
> distinction.

Well, what I'm thinking about maintains the "factory of objects", just
expands on it a little.  That is, a "module class" (a class that has
kind of "private" classes inside itself) is also potentially a factory
of objects.  Different class methods may return different objects, but
that is the the case with the system we have now.  There is nothing
that says a class method must return an instance of it's own class.

The problem with "modules = scoped group of classes" is that it
introduces some new syntax to deal with this distinction.  It would be
nice if things could remain "objects all the way down".

As far as confusion, that is a valid concern, but in modern times all
development is done in an IDE.  That is, the tools expand our
capabilities and I would rely on the tools for this situation as well.
 The tools would have to operate such that there was no confusion.

More information about the Squeak-dev mailing list