[squeak-dev] Dictionary>>collect: returning OrderedCollection?

Hans-Martin Mosner hmm at heeg.de
Thu Jun 12 21:32:34 UTC 2008


Andreas Raab schrieb:
> Does anyone besides me consider this a bug? What does ANSI say about
> this issue?
I think that #collect: should be in line with #select: and #reject:
which both return Dictionaries.
One possible reason why #collect returns a different kind of collection
is that for some base collections, the results of the block might not
fit (for example, "aByteArray collect: [:x | x odd]" would raise an
exception).
Incidentally, VisualWorks behaves as you and I expect.

Cheers,
Hans-Martin



More information about the Squeak-dev mailing list