[Pharo-project] sharedPools
Hi guys I would like to see how we can clean the protocols. Behavior>>sharedPools "Answer a Set of the names of the pools (Dictionaries) that the receiver shares. 9/12/96 tk sharedPools have an order now" ^ OrderedCollection new => I will update the comment (this is not a set nor with names!) => I would like to move down to classDescription such methods because all the other methods are defined there or in Class. Class>>sharedPools "Answer a Set of the pool dictionaries declared in the receiver." sharedPools == nil ifTrue: [^OrderedCollection new] ifFalse: [^sharedPools] => I will update the comment TraitBehavior>>sharedPools ^ Dictionary new oops! I would be good to have polymorphic results! I will return ^ OrderedCollection new Now I'm not sure if it makes sense (but this is probably better) that RBClass returns also a polymorphic results. I have the impression that we get an orderedCollection too. RBClass>>sharedPools ^ self allPoolDictionaryNames collect: [ :each | Smalltalk globals at: each asSymbol ifAbsent: [ Dictionary new ] ] Ring seems to miss sharedPools. Stef
what a coincidence....since yesterday I have problems when swapping in classes I swapped out and used SharedPools...I am still searching the bug :(
TraitBehavior>>sharedPools ^ Dictionary new
oops! I would be good to have polymorphic results! I will return ^ OrderedCollection new
And put a comment (I guess) that Traits DO NOT accept sharedPools but this method is here in order to talk polymorphically with traits/classes when doing things like #allBehaviorsDo: #allClassesAndTraits..etc.... if this is not correct...then why not to remove this method ?
Now I'm not sure if it makes sense (but this is probably better) that RBClass returns also a polymorphic results. I have the impression that we get an orderedCollection too.
RBClass>>sharedPools ^ self allPoolDictionaryNames collect: [ :each | Smalltalk globals at: each asSymbol ifAbsent: [ Dictionary new ] ]
Ring seems to miss sharedPools.
Stef
-- Mariano http://marianopeck.wordpress.com
participants (2)
-
Mariano Martinez Peck -
Stéphane Ducasse