[squeak-dev] (Environment named: #Smalltalk) trap in 4.5

Chris Muller ma.chris.m at gmail.com
Thu May 1 20:46:37 UTC 2014


While working on serialization of objects referencing the new
"Smalltalk globals," (now an Environment), I came across an apparent
issue with our 4.5 release image.  The Smalltalk Environment is at
String-key 'Smalltalk' of its 'Instances' IdentityDictionary.

So we have no way to access (Environment named: 'Smalltalk') or
(Environment named: #Smalltalk) without inadvertently creating a new
Environment with that name.

Both the key and the Smalltalk Environment currently have String's for
the name, but #environmentNamed: assumes the argument is a Symbol.
Could we choose to consistently use either Strings or Symbols
exclusively?

Either way, I would like to convert the 'Instances' global to a
regular Dictionary instead of a IdentityDictionary.  If we end up
deciding to use Symbol names, then logical #= (which defaults to #==
in Object anyway) works whereas if we use Strings, it will work too.


More information about the Squeak-dev mailing list