[plt-scheme] scribblings on PLT Scheme 4.0

From: Robby Findler (robby at cs.uchicago.edu)
Date: Wed May 23 23:48:59 EDT 2007

On 5/23/07, Sridhar Ratna <sridhar.ratna at gmail.com> wrote:
> On 5/24/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> >
> > At the language level, we are considering a few changes for version
> > 4.0. The most significant are:
> >
> >  * Pairs will become immutable by default. This is the big change that
> >    will break backward compatibility. We can provide a compatibility
> >    `mzscheme' library, but we can't do that for all the libraries whose
> >    public interface mentions lists.
> Does this mean that standard procedures like `set-car!' and `set-cdr!'
> will be deprecated?

set-car and set-cdr will fail on immutable pairs.

Think of it this way: we currently have cons and immutable-cons. We're
going to rename them to mutable-cons and cons (respectively). set-car
and friends will continue to behave the same.

The really trick part of this (and the reason we'd not done it
earlier) is that there are lots of primitives in scheme (like `map'
and procedures defined like (lambda args ...)) that build lists
implicitly. Those will now build lists of immutable pairs, not mutable


Posted on the users mailing list.