[plt-scheme] Native code generation and immutable pairs

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu Mar 9 15:35:16 EST 2006

At Thu, 9 Mar 2006 11:34:09 -0800, "Jim Blandy" wrote:
> On 2/11/06, Robby Findler <robby at cs.uchicago.edu> wrote:
> > At Fri, 10 Feb 2006 00:07:55 -0800, Jim Blandy wrote:
> > > If MzScheme is heading down the native code generation route, have you
> > > thought much about making pairs immutable?
> >
> > I don't know if anyone answered your question, but yes. We are
> > considering that and have been for a long time. Partly because it
> > improves analyses like you suggest, but more because it makes it easier
> > to reason about programs using immutable conses (and contract systems
> > work better when structures are immutable). In particular, you can hand
> > out the same list multiple times from a library without having to worry
> > about copying it to be safe/correct.
> 
> I see on http://www.cs.indiana.edu/~dyb/r6rs/status.html that the R6RS
> committee has reaffirmed that set-car! and set-cdr! will be in the
> language.  So let me push further: have you folks made a decision on
> this yet?

I think we've come to the same conclusion as the R6RS editors, for now:
dumping `set-car!' and `set-cdr!' is a good idea, but getting rid of
them will take a lot of effort, and we'd rather spend effort elsewhere
right now.

Matthew



Posted on the users mailing list.