Search code examples
smalltalk

Why PoolDictionaries have to be re-declared in subclasses?


Assume I have a class that uses a PoolDictionary. A subclass that also wants to use the same PD must declare it again. Even though this is not the case, another alternative would have been to extend the scope of the PD to the entire sub-hierarchy. Why this has to work this way? Is there any good example where this "limitation" is useful or makes sense?


Solution

  • In Pharo, pool dictionaries are transmitted to subclasses, so perhaps you are referring to a particular implementation?