immutable pairs in existing implementations Per Bothner (17 Sep 2014 16:50 UTC)
Re: immutable pairs in existing implementations John Cowan (17 Sep 2014 17:45 UTC)
Re: immutable pairs in existing implementations Per Bothner (18 Sep 2014 07:10 UTC)

Re: immutable pairs in existing implementations Per Bothner 18 Sep 2014 07:10 UTC

On 09/17/2014 10:45 AM, John Cowan wrote:
> Per Bothner scripsit:

>> For quote/read identity (which is not essential but is desirable,
>> especially if you might have circular lists) read should be allowed to
>> return an immutable list.
>
> I see that Kawa does so, but I think it's not conformant to RnRS: the (
> ... ) syntax in `read` should return mutable lists.

I added a flag to the Kawa reader, so it returns mutable pairs when called
directly by the read procedure, but returns immutable pairs when called by
"the parser" (i.e. when reading expressions to be compiled/evaluated).  This seems
a workable solution: specifically quoted lists get read as immutable pairs.
--
	--Per Bothner
xxxxxx@bothner.com   http://per.bothner.com/