Re: [scheme-reports-wg2] Re: R7RS-large discussion: Basic Types and Sorting Per Bothner (08 Jun 2016 15:35 UTC)

Re: [scheme-reports-wg2] Re: R7RS-large discussion: Basic Types and Sorting Per Bothner 08 Jun 2016 15:35 UTC


On 06/08/2016 07:15 AM, John Cowan wrote:
> Per Bothner scripsit:
>
>> Mostly.  I also propose that string literals (and other immutable
>> strings in R7RS-large) have type text.   I,e, (text? "foo") => #t.
>
> That can't be implemented portably, because there is no portable
> way to detect an R7RS-immutable string, and some Schemes don't
> even have the concept of distinguishing between ordinary and
> R7RS-immutable strings.

We're not talking "portable".  We're talking R7RS-large. At least I am.
If "portable" is a constraint, the obviously literal «foo» isn't an option either.

On 06/08/2016 07:38 AM, Taylan Ulrich Bayırlı/Kammer wrote:> Per Bothner <xxxxxx@bothner.com> writes:

>> Mostly.  I also propose that string literals (and other immutable
>> strings in R7RS-large) have type text.   I,e, (text? "foo") => #t.
>
> This means breaking (string? "foo"), no?

No.  If text is a sub-type of string, it follows that whenever (text? X) we also have (string? X).
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/