[R6RS] strings: immutable, mutable, extensible
William D Clinger
will at ccs.neu.edu
Thu Mar 22 07:20:35 EDT 2007
Let me outline one possible response to formal comment 233.
Following the precedent set by mutable pairs, we could
move string-set! and the other procedures that mutate
strings into a separate library, say (r6rs strings mutable).
Extending that idea, we could add (r6rs strings extensible)
that adds something like the string-append! procedure
proposed by formal comment 233.
Simple implementations of R6RS would use a mutable,
extensible representation of strings no matter which
libraries are imported by a program. More sophisticated
implementations would use that kind of representation
only if some part of the program imports (r6rs strings
extensible). If that library is not imported anywhere,
but (r6rs strings mutable) is, then the implementation
would use the kind of representation that would be
appropriate for strings as described by the 5.92 draft.
If neither (r6rs strings mutable) nor (r6rs strings
extensible) is imported anywhere, then yet a third
representation could be used.
Then programs wouldn't have to pay for extensible
strings if they don't use them, and programs wouldn't
even have to pay for mutable strings if they don't
More information about the R6RS