[squeak-dev] Ideas about sets and dictionaries

Levente Uzonyi leves at elte.hu
Wed Nov 11 12:09:56 UTC 2009


Hi,

Here are some ideas that I would like to see in the trunk:
- create a common superclass (HashedCollection) for Set and Dictionary
- since #valuesDo: is the same as #do: in dictionaries, we should only  
implement one of them. I'd go for implementing #do: and #valuesDo:  
would send #do:
- add Andres' changes (or something similar)  
http://lists.gforge.inria.fr/pipermail/pharo-project/2009-November/015464.html  
which help with weak hash values (#identityHash).
- enable Sets to contain nil by using another object for marking empty slots
- review/add tests
- review/add class/method comments
- since Dictionary >> #keys returns an Array, dictionaries could  
implement #keySet which would return a set with the dictionary's keys,  
the implementation could be nearly as fast as #keys
- harvest fixes/tweaks from mantis

Some of these would affect other parts of the system, some may not be  
useful, so I'm interested about your opinion before I start commiting.

Cheers,
Levente




More information about the Squeak-dev mailing list