[BUG][FIX] WeakKeyDictionary>>keysAndValuesDo:

goran.krampe at bluefish.se goran.krampe at bluefish.se
Tue Jun 15 06:57:20 UTC 2004


Hi Richard and all!

"Richard A. O'Keefe" <ok at cs.otago.ac.nz> wrote:
[A very thorough (as always from Richard :)) writeup about hash/= etc
SNIPPED]
> Note that you *can* usefully put mutable objects into IdentitySets and use
> them as keys in IdentityDictionaries and still keep on changing them to your
> heart's content, and you *can* add an IdentitySet to itself without any
> special problems.

Yes, in fact - I think many Smalltalkers use Dictionary or Set, perhaps
by habit without thinking, when in fact they should be better off with
IdentityDictionary or IdentitySet.

Don't have the 3.7 up right now, but perhaps we could make some note in
the class comment of Dictionary/Set about this to try to lead people to
the Identity-variants. Perhaps it is already there. :)

regards, Göran



More information about the Squeak-dev mailing list