Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo
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=4485


Since 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
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo
Updates:
        Labels: Milestone-1.4

Comment #1 on 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=4485

yes this is a good idea.

Stef


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo

Comment #2 on 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=4485

This sounds awesome!!! Per-class lookup would be invaluable to me for  
testing. Thanks for bringing it up and for accepting it :)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo
Updates:
        Labels: Type-Feature

Comment #3 on 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=4485

(No comment was entered for this change.)


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo
Updates:
        Labels: -Milestone-1.4

Comment #4 on 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=4485

Not for 1.4, I think


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo

Comment #5 on 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=4485

Would you actually have to write "self environmentLookup: #SomeSymbol" or  
are we talking about late binding names? Ideally, from a testing point of  
view, I would write "AClass" in a method and instead of storing the binding  
in the compiled method, it would store the Symbol, and look it up when the  
method is run...


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 4485 in pharo: Class environment: how we should properly lookup for a name using environment?

pharo
Updates:
        Labels: MigratedToFogBugz

Comment #6 on 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=4485#c6

Issue migrated to https://pharo.fogbugz.com/f/cases/4532

--
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker