Re: [scheme-reports-wg2] Re: R7RS-large discussion: Basic Types and Sorting John Cowan (07 Jun 2016 18:19 UTC)

Re: [scheme-reports-wg2] Re: R7RS-large discussion: Basic Types and Sorting John Cowan 07 Jun 2016 18:19 UTC

Per Bothner scripsit:

> 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.

Because we don't want texts to be merely R7RS-immutable, which means that
mutation may succeed, may fail, or may crash your Scheme.  We want them
to be fully immutable so that they can be reliably shared.  And that
concept is neither a subtype nor a supertype of mutable strings, as I
explained in an earlier post.

--
John Cowan          http://www.ccil.org/~cowan        xxxxxx@ccil.org
The present impossibility of giving a scientific explanation is no proof
that there is no scientific explanation. The unexplained is not to be
identified with the unexplainable, and the strange and extraordinary
nature of a fact is not a justification for attributing it to powers
above nature.  --The Catholic Encyclopedia, s.v. "telepathy" (1913)