[plt-scheme] Native code generation and immutable pairs

From: Robby Findler (robby at cs.uchicago.edu)
Date: Sat Feb 11 14:25:12 EST 2006

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.

(Note that there are already immutable cons's in mzscheme -- it's
really a question of which kind of cons cell does `cons' (and read and
...) produce.)

Robby


Posted on the users mailing list.