lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Tue, Feb 21, 2012 at 2:24 PM, Alex Queiroz <> wrote:

> Actually most Scheme compilers bind variables to values, not
> locations, when the variable is not set!. When a variable is set!, a
> box, or cell, is created by the compiler front-end. This makes
> compiling and optimising much easier.

Right. John's 1994 proposal was to make that explicit to programmers.

> What some implementations of Scheme did, notably Racket, was to make
> *pairs* immutable by default, therefore set-{car,cdr}! cannot be used
> on them, but on the new type "mutable pair".

This is relatively recent in Scheme terms: I see 2008 as the date PLT
Scheme tried it. I wish I could say "oh yeah, I knew about that" but I
didn't. I kinda dropped out of the Scheme world some time during the
great dark interregnum between R5RS and R6RS; my comment at the time
was "There are more available Scheme implementations than available
Scheme applications." This has since improved....

Will Clinger's 2008 thoughts about *Scheme* adopting immutable cons
are at
. (I was lucky enough to take the undergrad compilers class about the
time he came to Northeastern--amazingly patient with my fellow "all
the world's C running on i386" students.)