On 26 ao�t 2013, at 15:04, Igor Stasenko wrote:
In the current system (in fact since Pharo 1.3 I think) we have that:
Object subclass: #A.
envA := SystemDictionary new.
envA at: #Smalltalk put: 33.
A environment: envA.
A compile: 'st ^ Smalltalk'.
A new st
-----> 33
Again, that doesn't change the semantic!
The problems will only appear once several environment will be introduced.
Code in dev tools that try to fetch a global via ThisEnvironment (the one of tool package) instead of someClass environment (the one of a class the tool display, inspect, browse...).
The very same problems would happen with #asClass, except that this time, we'll have to revisit all the senders of #asClass and company.
It just ensure to lock the system in its current state...
So browsing senders of #asClass, #asClassIfPresent:, #asClassIfAbsent: and #asClassIfAbsent:ifPresent: is much more easy than browsing reference to ThisEnvironment?
And you would most probably never have to visit the reference to ThisEnvironment...