[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Redefining locals
- From: "Dr. Rich Artym" <rartym@...>
- Date: Thu, 11 Nov 2004 21:04:36 +0000
On Thu, Nov 11, 2004 at 02:17:09PM -0500, Aaron Brown wrote:
> I just ran the following through Guile (the Gnu version of
> Scheme) and got "baz".
>
> (let ((foo 'bar))
> (define func (lambda ()
> foo))
> (set! foo 'baz) ;; Alters the foo within func.
> (func))
Aaron, Guile's set! syntactic keyword is not legal Scheme. :-)
Admittedly it used to be legal in older versions of Scheme (up to 5c4),
and then Scheme r4rs referred to it as a "compatible extension but not
a compliant implementation" of Scheme (lol, Scheme had a lot of politics
in those days). And finally they bit the bullet and simply made it
illegal Scheme starting from r5rs. Scheme's always tried to move in
the direction of lambda calculus purity.
The Guile folks chose to be non-compliant on this point because they
needed the functionality of such a construct, which is fair enough.
Rich Artym.
--
Existing media are so disconnected from reality that our policy debates
spin around a fantasy world in which the future looks far too much like
the past. http://www.zyvex.com/nanotech/MITtecRvwSmlWrld/article.html