Marcel Taeumel uploaded a new version of Help-Squeak-Project to project The Trunk:
http://source.squeak.org/trunk/Help-Squeak-Project-mt.40.mcz ==================== Summary ==================== Name: Help-Squeak-Project-mt.40 Author: mt Time: 11 August 2016, 5:26:19.085564 pm UUID: 06ded287-6848-1844-9baf-ea302e76df60 Ancestors: Help-Squeak-Project-mt.39 Sort release notes so that the latest comes first. =============== Diff against Help-Squeak-Project-mt.39 =============== Item was changed: ----- Method: SqueakReleaseNotes class>>pages (in category 'accessing') ----- pages | dir | dir := FileDirectory default directoryNamed: 'doc'. ^ dir exists ifFalse: [#()] + ifTrue: [(dir entries collect: [:entry | entry name]) sortBy: [:a :b | a >= b]]! - ifTrue: [dir entries collect: [:entry | entry name]]! |
Please do not use #sortBy:. It should have been deprecated in favor of
#sorted:. Levente On Thu, 11 Aug 2016, [hidden email] wrote: > Marcel Taeumel uploaded a new version of Help-Squeak-Project to project The Trunk: > http://source.squeak.org/trunk/Help-Squeak-Project-mt.40.mcz > > ==================== Summary ==================== > > Name: Help-Squeak-Project-mt.40 > Author: mt > Time: 11 August 2016, 5:26:19.085564 pm > UUID: 06ded287-6848-1844-9baf-ea302e76df60 > Ancestors: Help-Squeak-Project-mt.39 > > Sort release notes so that the latest comes first. > > =============== Diff against Help-Squeak-Project-mt.39 =============== > > Item was changed: > ----- Method: SqueakReleaseNotes class>>pages (in category 'accessing') ----- > pages > > | dir | > dir := FileDirectory default directoryNamed: 'doc'. > ^ dir exists > ifFalse: [#()] > + ifTrue: [(dir entries collect: [:entry | entry name]) sortBy: [:a :b | a >= b]]! > - ifTrue: [dir entries collect: [:entry | entry name]]! > > > |
Hi Levente, ah, because it creates a new instance and does not change data in-place. I see. Will do. Best, Marcel |
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. > > |
Hi Levente, as far as I could see, the remaining uses of #sortBy: in the image work now fine with #sorted:. #sortBy: is now officially deprecated. Any objections? (It's not even much. Only 20 senders of #sorted:.) Best, Marcel |
Free forum by Nabble | Edit this page |