[Modules] Upper case message names for accessing modules

Chris Becker chb99 at msn.com
Thu Feb 21 23:15:22 UTC 2002


How about this alternative for direct module references ...

ellipse := ModuleReference morphic core basic EllipseMorph new.

Even without an understanding of the underlying classes you get a good idea
of what is going on.

Chris Becker


-----Original Message-----
From:	Hannes Hirzel [mailto:hirzel at spw.unizh.ch]
Sent:	Thursday, February 21, 2002 4:36 PM
To:	Chris Becker
Cc:	squeak-dev at lists.squeakfoundation.org
Subject:	RE: [Modules] Upper case message names for accessing modules



On Thu, 21 Feb 2002, Chris Becker wrote:

> Although I like this form best because it is clean and simple ...
>
> ellipse := Squeak Morphic Core Basic EllipseMorph new.
>
> ... the uninitiated Smalltalker will be confused by the ambiguity between
> class names and module names. Although Morphic is a class, in this context
> it's the name of a module. Core and Basic aren't classes, they're modules.
> EllipseMorph is a class that we're sending the 'new' message to, so it's
not
> a module name in this case. Or is it?
>
> Maybe something like this would clear it up ...
>
> ellipse := Squeak modMorphic modCore modBasic EllipseMorph new.
>
> Since I assume you are automatically generating messages for the Squeak
> class that correspond to installed module names, couldn't you preface the
> messages with lowercase "mod" so they still look like messages? This
prefix
> would also reinforce the fact that they are modules so they won't be
> confused with class names.
>

Thank you for coming up with this proposal.
I consider this to be a good solution written in readily understandable
Smalltalk style.

It can be explained easily and takes away some of the "mystery" around
modules.

I second this proposal.

Hannes Hirzel





More information about the Squeak-dev mailing list