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

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to