[BUG] Set>>collect:

Bob Arning arning at charm.net
Fri Feb 14 15:59:47 UTC 2003

On Fri, 14 Feb 2003 07:17:29 -0800 Bill Spight <bspight at pacbell.net> wrote:
>Consider the fact that SortedCollection>>collect: yields an
>OrderedCollection. That makes sense, because it is an extra burden on
>collect: to sort the new collection. *And you can always sort the new
>collection if you want to.*

Efficiency is not the only consideration. Having SortedCollection>>collect: return a SortedCollection might fail if the collected elements were not sortable, especially if using the sortBlock of the receiver. Returning an OrderedCollection prevents this sort of failure.


More information about the Squeak-dev mailing list