[plt-scheme] Native code generation and immutable pairs

From: Jim Blandy (jimb at red-bean.com)
Date: Fri Mar 10 00:37:36 EST 2006

On 3/9/06, Lauri Alanko <la at iki.fi> wrote:
> On Thu, Mar 09, 2006 at 08:48:50PM -0800, Jim Blandy wrote:
> > On 3/9/06, Chongkai Zhu <u0476504 at utah.edu> wrote:
> > > Could you please explain why "dumping `set-car!' and `set-cdr!' is a
> > > good idea"? Thank you.
> >
> > My reasons, at least, are given in these messages:
>
> So what exactly are you proposing? cons-immutable is available already
> for anyone wanting to use it. Making the procedure named "cons" produce
> immutable pairs by default would break half the world and then some.

Yes, it would.

> Are you proposing that a new non-R5RS dialect be included in the core
> PLT distribution with more ML-ish default data types, and people be
> encouraged to use it in future code? Or what?

I guess so.  I don't really know.

You follow my argument that the pre-emption / mutation combination
basically kills the most powerful of those nifty analyses we Schemers
assumed were going to make our code fast, right?  We have a choice
between two kinds of unusability: lack of pair mutation, or lack of
performance.

The thing I'd most readily throw out is preemption.  But there are
many interesting environments --- say, inside browsers and web servers
--- that are already multi-threaded, and being intolerant of
system-level threads is a serious strike against the language.


Posted on the users mailing list.