[Modules] Upper case message names for accessing modules

Les Tyrrell tyrrell at canis.uiuc.edu
Sat Feb 23 06:36:08 UTC 2002


----- Original Message -----
From: Chris Becker <chb99 at msn.com>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Thursday, February 21, 2002 1:13 PM
Subject: RE: [Modules] Upper case message names for accessing modules

> Maybe something like this would clear it up ...
>
> ellipse := Squeak modMorphic modCore modBasic EllipseMorph new.

Actually,  I would argue for something more along the following lines:

    ellipse := Ellipse new.

If you really had to, you could resort to something like:

    ellipse := MorphicEllipse new, or perhaps ellipse := EllipseMorph new.

If you allow your modules/namespaces to alias names, and have the tools to do
this easily, then this should be a gimme.  Chances are, you have a pretty good
idea of which Ellipse you are dealing with in your code, and if you really
really need to disambiguate it you can go ahead and give it a slightly more
restricted name.  Elsewhere, you can note that Ellipse really means "that
Ellipse morph over in the Morphic package".   Filtering patterns along the
lines of "Everything that looks like Morphic* I get from the Morphic package"
could be a real timesaver.  The point is, you the programmer have the
flexibility to reference your globals with names that make sense in the
context of any given module.

( hats off to Stephen Pair for bringing this idea up again )

- les





More information about the Squeak-dev mailing list