status: final (2017-05-24)
keywords: Data StructureSee also SRFI 118: Simple adjustable-size strings and SRFI 135: Immutable Texts.
This attempts to solve the same issues with R7RS strings raised by SRFI-135, but with better integration with the Scheme language.
We propose to retain the name string as the type of sequences of Unicode characters (scalar values). There are two standard subtypes of string:
string-set! on an istring throws an error. On the
other hand, the core operations
string-length are guaranteed to be O(1).
string-set! and other operations.
string-length have no performance guarantees. On many
implementation they may take time proportional to the length of the
An implementation may support other kinds of
strings. For example on the Java platform it may be reasonable to
consider any instance of
java.lang.CharSequence to be a
The main part of the proposal specifies the default bindings of various procedure names, as might be pre-defined in a REPL. Specifically, some procedures that traditionally return mutable strings are changed to return istrings. We later discuss compatibility and other library issues.
This combines SRFI-13, SRFI-135, and SRFI-118.