[BUG;FIX] Environment handling #at:#ifAbsent

Andrew C. Greenberg werdna at gate.net
Sat Dec 11 07:22:52 UTC 1999


--============_-1267225522==_============
Content-Type: text/plain; charset="us-ascii" ; format="flowed"


The present Environment implementation presently supports legacy code 
of the form:

	Smalltalk at: aSymbol

but does not handle legacy code of the form:

	Smalltalk
		at: aSymbol
		ifAbsent: aBlock.

The attached changeset "fixes" this.  Note that legatees of this 
"fix" (and the first mentioned hack) are destined to disappoint if 
they do not in time adapt.  Each does a depth-search in the 
environment space to find a symbol.

Thus if code depending on this stuff had a user mistype aSymbol, but 
the typo existed in another NameSpace, blammo.  Likewise if a user 
has two or more namespaces with the same aSymbol.   The code would 
then be at the mercy of the depth-search to see which of the several 
aSymbols would get picked.

This changeset addresses the failing behavior of 
TestInterpreterPlugin under the new Environment regime.
--============_-1267225522==_============
Content-Type: text/plain; name="EnvironmentAtIfAbsent.1.cs"
 ; x-mac-type="65417070"
 ; x-mac-creator="43534F6D"
Content-Disposition: attachment; filename="EnvironmentAtIfAbsent.1.cs"
Content-Transfer-Encoding: imap_stub

0,2264,2.2,782,0,

--============_-1267225522==_============--





More information about the Squeak-dev mailing list