Re: [scheme-reports-wg2] Re: R7RS-large discussion: Basic Types and Sorting Per Bothner (07 Jun 2016 18:02 UTC)

Re: [scheme-reports-wg2] Re: R7RS-large discussion: Basic Types and Sorting Per Bothner 07 Jun 2016 18:01 UTC


On 06/07/2016 10:50 AM, John Cowan wrote:
> Per Bothner scripsit:
>
>> That should have been: Why can't we unify the concepts R7RS "immutable string"
>> and SRFI-135 "text"?
>
> Because the term "immutable" is used in two different meanings.  In R7RS
> certain strings are immutable in the sense that the Standard does not
> prescribe the effects of attempting to mutate them (for example, mutating
> the string returned by string->symbol may in some implementations break
> the symbol).  Texts, like SRFI 116 immutable pairs, are immutable in
> the sense that there are no operations which can mutate them.

So?  Why can't we don't define the type of a string literal to have the
type 'text' or 'istring' or whatever?  R7RS already informally has a
type 'immutable string', which is a subtype of 'string'.  I suggest
we formalize and extend this concept, rather than add a new 'text' concept.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/