[r6rs-discuss] [Formal] Request for reconsideration (in part) of formal comment #47

John Cowan cowan at ccil.org
Fri Jan 5 14:40:06 EST 2007


---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Submitter: John Cowan
Email address: cowan at ccil.org
Issue type: Enhancement
Priority: Major
Component: Other
Report version: 5.92
Summary: Change the response to formal comment #47 to provide
vector-sort!, not vector-sort.

The response to formal comment #47 says that R6RS will provide list-sort
and vector-sort procedures, both to be stable and nondestructive.
However, an important application of vectors is in situations where large
sequences are required and memory must be conserved.  In this context,
it is often useful to sort a 1G vector in place rather than causing the
application to thrash (or crash) by allocating another such vector.

Providing vector-sort! as primitive will alleviate this requirement.
It is very easy to define vector-sort on top of it by copying the source
vector and destructively sorting the copy.

No such issues arise for list-sort, so it can and should be left nondestructive.

-- 
John Cowan  cowan at ccil.org  http://ccil.org/~cowan
If I have not seen as far as others, it is because giants were standing
on my shoulders.
        --Hal Abelson




More information about the r6rs-discuss mailing list