lua-users home
lua-l archive

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


["Dr. Rich Artym" <rartym@galacta.demon.co.uk>]
> 
> 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.

Please provide a reference. I believe you're wrong once again. This is
from R5RS:

    syntax:  (set! <variable> <expression>) 

    <Expression> is evaluated, and the resulting value is stored in the
    location to which <variable> is bound. <Variable> must be bound either
    in some region enclosing the set! expression or at top level. The
    result of the set! expression is unspecified.

    (define x 2)
    (+ x 1)                         ===>  3
    (set! x 4)                      ===>  unspecified
    (+ x 1)                         ===>  5

(http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-7.html#%_idx_102)

Matt

-- 
Matt Hellige                  matt@immute.net