[squeak-dev] Re: The Trunk: Help-Squeak-Project-mt.40.mcz
Levente Uzonyi
leves at caesar.elte.hu
Fri Aug 12 09:44:16 UTC 2016
Hi Marcel,
On Fri, 12 Aug 2016, marcel.taeumel wrote:
> Levente Uzonyi wrote
>> Please do not use #sortBy:. It should have been deprecated in favor of
>> #sorted:.
>>
>> Levente
snip
>
> Hi Levente,
>
> ah, because it creates a new instance and does not change data in-place. I
No. It's because #sorted: works for all Collections, while #sortBy: is
specific to SequenceableCollection. #sortBy:'s comment is inaccurate about
the return value (it doesn't create a _copy_ unless the receiver is an
OrderedCollection), and it relies on #asOrderedCollection's unusual
implementation, which returns a copy even if the receiver is an
OrderedCollection.
> see. Will do.
Thanks!
Levente
>
> Best,
> Marcel
>
>
>
> --
> View this message in context: http://forum.world.st/The-Trunk-Help-Squeak-Project-mt-40-mcz-tp4910536p4910638.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
>
>
More information about the Squeak-dev
mailing list
|