[CLJ-892] sort changes its argument, if a Java array Created: 08/Dec/11 Updated: 18/May/12 Resolved: 18/May/12 |
|
| Status: | Closed |
| Project: | Clojure |
| Component/s: | None |
| Affects Version/s: | Release 1.3, Release 1.4 |
| Fix Version/s: | Reviewed Backlog, Release 1.5 |
| Type: | Enhancement | Priority: | Minor |
| Reporter: | Stephen Compall | Assignee: | Unassigned |
| Resolution: | Completed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
java version "1.6.0_22" |
||
| Attachments: |
|
| Patch: | Code |
| Approval: | Ok |
| Description |
|
user> (let [a (to-array [32 11])] Where the second line printed ought to be the same as the first. |
| Comments |
| 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. |