[CLJ-892] sort changes its argument, if a Java array Created: 08/Dec/11 Updated: 26/Jul/13 Resolved: 18/May/12
|Affects Version/s:||Release 1.3, Release 1.4|
|Fix Version/s:||Backlog, Release 1.5|
java version "1.6.0_22"
user> (let [a (to-array [32 11])]
Where the second line printed ought to be the same as the first.
|Comment by Stuart Halloway [ 09/Dec/11 9:37 AM ]|
This is an enhancement request, since the docs for sort make no promise one way or the other.
For performance, I prefer the current behavior, so another possibility is a clarifying doc string.
|Comment by Andy Fingerhut [ 26/Mar/12 5:32 PM ]|
clj-892-clarify-sort-sort-by-doc-strings-patch1.txt of Mar 26, 2012 applies cleanly to latest master on that date. Only doc string changes, to make it clear that by sort and sort-by will modify Java arrays given as arguments.