This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 326: Add destructive list-copy!, string-copy!, and vector-copy!

2012-10-05 12:42:46
WG1 - Core
cowan
major
cowan
fixed
source
closed
2012-01-10 08:31:11
defect

From Per Bothner:

Copying a slice from one vector/string into another is such a fundamental operation that it should be added, IMO, considering that it's tedious to write if "by hand", and that a standard library routine is likely to be much more efficient (especially for strings, since that avoids the need for boxing and unboxing the characters). [JC: Many implementations represent characters as immediates, however.]

One could also argue that "character" operations don't really make semantic sense in a Unicode world, and so string-set! has limited usefulness. Thus string-copy [with start/end arguments] and string-copy! are the actual useful "primitive" operations.

JC: These would be the five-argument versions based on the current bytevector-copy-partial!, possibly with renumbering of arguments depending on the outcome of #325.

The WG voted to adopt the part of this proposal covering string-copy! and vector-copy!, but not list-copy!.

statusnewdecided
owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed