[squeak-dev] Ideas about sets and dictionaries round #2
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Nov 17 07:21:37 UTC 2009
2009/11/17 Levente Uzonyi <leves at elte.hu>:
> Hi,
>
> Round #1 was mostly about sets containing nil, and the winner seems to be
> the object-oriented solution implemented by Igor:
> http://bugs.squeak.org/file_download.php?file_id=3829&type=bug
>
> What about the other ideas?
>
> - create a common superclass (HashedCollection) for Set and Dictionary
>
+1 http://lists.squeakfoundation.org/pipermail/squeak-dev/2007-June/117894.html
(biased opinion)
> - implement #valuesDo: only in Dictionary as a single self send of #do: and
> remove other implementations from it's subclasses
>
+1
> - 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).
>
+1
> - add #keySet to dictionaries which returns a set with the keys, since #keys
> now returns an Array
>
If it add something to keys asSet, why not.
For large collections a clever trick could be to not rehash the keys
(Use a Set of same capacity...).
cheers
Nicolas
>
> If you have anything against these ideas, please let us know.
>
> Cheers,
> Levente
>
>
More information about the Squeak-dev
mailing list
|