[r6rs-discuss] [Formal] allow variable-length strings
Hi Per,
Excellent ideas.
Per Bothner wrote:
> Hence I suggest adding:
>
> (string-append! str1 str2)
> (string-append! str1 ch2)
> or more generally:
> (string-append! str1 str-or-char ...)
>
> These modify str1 in place. They return the unspecified value.
Is there any reason to return the unspecified value as opposed to
returning str1 (post-modification)? It seems that returning str1 would
be more useful to a functional programming style. Additionally, this
would make it a drop-in replacement for the existing string-append, in
cases where modification of str1 is not harmful.
Additionally, in analogy to the existing string-append, I would move for
string-append! to take many args rather than just 2, modify the first
one to become the concatenation of all of them, and then return the
first one (modified).
Regards,
Jon
Received on Wed Mar 21 2007 - 11:06:06 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC