srfi-140 compatibility Per Bothner 29 Jul 2017 11:57 UTC

I did a quick comparison of srfi-140 and srfi-152.

They seem to be mostly "compatible", except of course for the biggie:
where a srfi-140 procedure returns an immutable string,
srfi-152 returns a mutable string.  But I believe those strings
will be equal?, so in general code written for one will work
with the other.

There are some differences. For example 140 keeps the xsubstring
name from srfi-13, rather than string-replicate. The former allows
also more xsubstring arguments to be defaulted.  It would be easy
(and reasonable) for systems implementing 140 to add string-replicate
as an alias for xsubstring.

Srfi-140 has some procedures that srfi-152 doesn't have (such as
string-append!) and vice versa (such as string-take-while).

The other major difference is that srfi-140 does have performance guarantees,
basically the same ones as stri-135, but using traditional procedure names.

      Consequently, this SRFI suggests that Scheme's mutable strings be used only for
      buffers and other relatively short sequences of characters, while using the immutable
      texts defined by SRFI 135 for long sequences of characters.

Which is why I don't intend to implement srfi-152 for Kawa, at least not in any
default modes, including (import (kawa base)).  I am even more convinced that
having both srfi-135 and srfi-152 in the core of the same programming language
will lead to a confusing mess.
	--Per Bothner