Dec. 23, 2009
8:16 p.m.
On Wed, 23 Dec 2009, Adrian Kuhn wrote:
Levente Uzonyi <leves@...> writes:
It's a hack, I took it from SortedCollection's quicksort implementation. This gives the best performance if you're sorting by <= which is the default.
Shouldn't `sort` do what `sort: nil` does?
A simple `aBlock ifNil: [ ^self sort ]` might be more intention revealing (of course assumed that `sort` implements a #<= based sort :)
In squeak #sort is implemented as self sort: nil. So that check would mean infinite recursion. Levente
--AA
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project