[squeak-dev] Re: about Dictionary valuesDo:
Andreas Raab
andreas.raab at gmx.de
Tue Oct 20 04:54:20 UTC 2009
Hi Nicolas -
I agree with your (original) reasoning that keys should return an array
just like values. Not only because of performance, but also because it
preserves ordering between keys and values making "aDict keys with:
aDict values do:" nicely symmetrical to "aDict keysAndValuesDo:".
Nicolas Cellier wrote:
> So I gave it a try with a bunch of commits
> (ouch, commiting is longer than editing!)
>
> I used #fasterKeys because the message already exist.
> I cannot change keys directly, a few senders really expect a Set (plus
> external packages...)
Which ones are those? I do dislike the idea of using fasterKeys. It's a
bad name (like using #valuesWithOrder instead of #values) and unless the
difficulties with the change are systematic (i.e., usage patterns that
are not easily detected and lead to hidden and hard to find issues) I
would much rather see this fixed than worked around.
Can you provide some examples of places that break?
Cheers,
- Andreas
More information about the Squeak-dev
mailing list
|