Re: Issues with Unicode Taylor R. Campbell 27 Apr 2006 17:20 UTC

   Date: Thu, 27 Apr 2006 12:55:34 -0400
   From: John Cowan <xxxxxx@ccil.org>

   Sebastian Egner scripsit:

   > One could start with a SRFI for immutable strings as an add-on
   > library---in the hope that the Scheme community will pick it up
   > as the primary string type in the distant future.

   Actually, getting immutable strings into R6RS would be trivial in
   terms of the document:  simply replace the sentence

           String-set! stores CHAR in element K of STRING and returns an
           unspecified value.

   in 6.3.5 with the following:

           String-set! returns a string whose elements the same (in the
           sense of eqv?) as those in STRING, with the exception of element
           K, which is instead the same as CHAR.  String-set! may or may
           not return a string which is the same as STRING, but must not
           side-effect STRING.

(I think you probably meant to strike the exclamation mark from the
name.)  My alternative string API almost provides this anyway, by the
way, under the name STRING-DISPLACE:

  (STRING-SET string cursor char)

    <=>

  (STRING-DISPLACE string cursor (STRING-CURSOR+ cursor string) char).