Status: Accepted
Owner:
[hidden email]
New issue 4485 by
[hidden email]: Class environment: how we should
properly lookup for a name using environment?
http://code.google.com/p/pharo/issues/detail?id=4485Since we moving to better modularity, one should avoid using:
Smalltalk at: #SomeClass
or
Smalltalk globals at: #SomeClass
instead in our classes we should use:
self environment at: #SomeClass.
but its still too low level, because it assuming that class environment is
a single dictionary and hence you can use #at: for accessing it contents.
So such use drives us into a wrong direction.
What i think we missing is a protocol to say:
self environmentLookup: #SomeSymbol.
Then class who implement this, could decide how to do a lookup to answer a
value of given symbol.
The initial implementation is quite simple:
Class >> environmentLookup: aSymbol
^ (self bindingOf: aSymbol) ifNotNil: [:b | b value ]
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker