[squeak-dev] asSortedCollection always copies?

Louis LaBrunda Lou at Keystone-Software.com
Fri May 6 21:32:26 UTC 2011


Hi Ralph,

I'm not disagreeing with you but the latest version of VA Smalltalk also
answers a copy for SortedCollection and OrderedCollection.  I don't know
why but there must be a reason?  Below is their code from SortedCollection.


asSortedCollection
	"Answer a new instance of SortedCollection
	 whose elements are the elements of the
	 receiver.  The sort order is the same as the
	 receivers sort order."

	^self copyAndGrowBy: 0
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com




More information about the Squeak-dev mailing list