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 <asandroq@gmail.com> 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 news:ab3ba227-349b-4642-8310-2cad90b05d9a@t11g2000yqg.googlegroups.com
aka http://groups.google.com/group/comp.lang.scheme/msg/d0c0afd9af020e9e
. (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.)

Jay