Modules and class organization

Francisco Garau fgarau at softhome.net
Sun Feb 24 12:24:27 UTC 2002


Luciano asked and Göran answered:
> >
> > Why are there different modules for Numbers, Proceses and Collections?
> > Intuitively, I would think that the minimal subset of the image (which
> > probably coincides with ANSI Smalltalk) should be grouped in a single
> > Core module.
>>
> > Is there any reason for having so many modules? Or it's just a
> > consecuence of the automatic mapping from class categories to modules
> > Have we definitely lost class categories? As I see them, modules and
> > class categories are enterely different concepts.
>
> Well, I think there have been some discussion on this but with no real
> conclusion.
> The concepts could map differently but in most cases they would probably
> map very similarly and do we then really NEED both?
>
> It might become a little bit complicated if we have both concepts. I
> don't think most
> other languages (those I know) have more than one way of grouping
> classes.
>

I think that modules and class organization are two different concepts and
that they should be kept separate. Class organization is an aid for
programmers to understand the Smalltalk system. On the other hand, modules are
an artificat to handle image partitioning.

The first concept is targeted towards the human reader. The second concept is
target towards the computer.

I think we shouldn't confuse these two different notions. I we do so, we would
probably end up with something that is not useful neither to human reader nor
to the computer.

When we do not clearly differentiate who (the computer or the human reader) is
going to take profit of a certain information, problems will certainly arise.
IMHO, that is what happened with type information. At first (with Fortran),
type information was added to aid the compiler in generating the appropiate
instructions (eg. integer or floating arithmetic). Then, someone realized that
type information could be useful to aid program understanding. So now, we have
type system like in C++ that is not good neither to the compiler nor to the
programmer.

Regards,
Francisco





More information about the Squeak-dev mailing list