[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: immutable pairs in existing implementations

This page is part of the web mail archives of SRFI 116 from before July 7th, 2015. The new archives for SRFI 116 contain all messages, not just those from before July 7th, 2015.



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
per@xxxxxxxxxxx   http://per.bothner.com/