This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Source for wiki ImmutableStrings version 1

author

cowan

comment


    

ipnr

127.11.51.1

name

ImmutableStrings

readonly

0

text

This is an attempt to determine which Schemes treat literal strings as immutable, using the code

{{{
(define y "abcde")
(string-set! y 0 #\c)
y
}}}

Mutates `y` to the value `"cbcde"`: MIT, Gambit, Chicken, Bigloo, Detroit, Stalin, Scheme->C, SCM, Chez, Vicare, Larceny, Ypsilon, JScheme, RScheme, S7, Unlikely, BDC, XLisp, UMB, Elk, SXM, Inlab, Foment, Picrin, Chibi

Raises an error about mutating an immutable object: Racket, Gauche, Scheme48/scsh, Guile, Kawa, SISC, Mosh, !IronScheme, STklos, KSi, !SigScheme, !TinyScheme, Scheme 9, Sizzle, Sagittarius

Does not support `string-set!`: NexJ, Shoe, Rep, Llava, !FemtoLisp, Dfsch, Owl Lisp (no mutation)

Does not support `#\c`: !MiniScheme, SIOD, Schemik

time

2016-07-15 22:51:33

version

1