[plt-scheme] scribblings on PLT Scheme 4.0

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu May 24 00:03:34 EDT 2007

There are many good reasons. The most basic one is that the programmer
knows more about the behavior of the program (once a cons is created,
its fields can't be changed). This is useful to know in a
multi-threading context, for example. It also means that program
analysis can be more effective, both for optimization purposes and to
help programmers reason about their code. It also means that the
contract library will work slightly better (you can have contracts for
lists of functions without having to specially make immutable lists).
Things like that.

Robby

On 5/23/07, Matthew Flatt <mflatt at cs.utah.edu> wrote:
> At Thu, 24 May 2007 09:13:52 +0530, "Sridhar Ratna" 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?
>
> We'd still have mutable pairs, `set-car!', `set-cdr!', and a
> `mutable-cons' procedure that is bound to `cons' in various
> compatibility libraries.
>
> But `cons' in the main language that we use would create immutable
> pairs, and `set-car!' would fail when applied to an immutable pair.
>
> Matthew
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.