[squeak-dev] Ideas about sets and dictionaries

Russell N Hyer hrothgar.ofstingan at gmail.com
Wed Nov 11 16:37:25 UTC 2009


So you're really talking about having two types of null?

nil being the set that contains nothing

and nil & null being the set that contains nothing and an unknown.

How are we meant to do mathematical operations on those two sets ?

and isn't nil the same as the empty set ?

{} ?

2009/11/11, Levente Uzonyi <leves at elte.hu>:
> 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