[UPDATES] More for 2.7alpha

Stephan Rudlof sr at evolgo.de
Tue Dec 7 05:03:38 UTC 1999


Dear Dan,

I like the Environment extension very much. But I have some remarks
though:

Dan Ingalls wrote in class comment to Environments:

....
Various methods may need to refer to objects that reside in
environnments that are not a part of their direct-access environment. 
For these references, a simple global reference,
	Thing
may not be used, and instead the construct,
	Envt Thing
must be used.  In this case Envt is a gloabl reference to another
environment, and the global name, Thing, is sent as a message to that
environment.

Obviously, such a foreign reference cannot be resolved unless the
environment in question implements a method of that name.  This is how
environmental variables are exported.

sr: Very nice 'information hiding'.

Each environment has its own unique class.  With this structure, each
environment can have its own instance-specific messeages to provide
access to its exported symbols.  Note that this mechanism provides much
faster runtime access than the Dictionary at: protocol.  Also note that
inheritance provides a trivial implementation of nested name scope by
the same token.

sr: Exactly what we need.

In the early stages of installing partitioned environments in Squeak,
interpreted access will be provided in several ways.  To begin with,
environments will intercept the doesNotUnderstand: message and, if the
message begins with a capital letter, it will look up the corresponding
name using #at:, and return the value if found.  A refinement to this
feature will be to compile an export method on the spot, so that
subsequent accesses to that variable run much faster.

sr: That's the only point which makes me some stomach-ache: I hope,
that's only thought for the early stages, isn't it!? It's a
contradiction to 'information hiding' above, but I understand that in
the meantime there has to be a solution to ensure the runnability of the
current system.

-- 
Stephan Rudlof (sr at evolgo.de)
   "Genius doesn't work on an assembly line basis.
    You can't simply say, 'Today I will be brilliant.'"
    -- Kirk, "The Ultimate Computer", stardate 4731.3





More information about the Squeak-dev mailing list