[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

string-copy/string-copy! inconsistency

This page is part of the web mail archives of SRFI 13 from before July 7th, 2015. The new archives for SRFI 13 contain all messages, not just those from before July 7th, 2015.



I fear the new string-copy! for one main reason: In all other cases in
Scheme, the only difference between a "!" and unmarked procedure with the
same name has been the fact that the "!" version modifies (or is at least
allowed to modify) its first argument and the unmarked version returns a
new object. In this case, the argument specs are different, and I suspect
this will be a source of confusion.

I suggest fixing this by [1] renaming the current string-copy! Off-the-cuff
suggestion, string-copy-chars! and [2] adding a non "!" version of the same
procedure (e.g., string-copy-chars), to provide the symmetry that there is
in the rest of the spec.

-dan

PS: Olin: Thanks once again for what looks like an excellent draft.