Add destructive list-copy!, string-copy!, and vector-copy!
|Reported by:||cowan||Owned by:||cowan|
|Component:||WG1 - Core||Keywords:|
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.
Change History (4)
comment:3 Changed 5 years ago by cowan
- Owner changed from alexshinn to cowan
- Status changed from decided to writing