R. Kent Dybvig wrote:
> If (set! VAR EXP) appears as one of the top-level forms of a
> <toplevel body>, the EXP in (set! VAR EXP) is deferred; in fact,
> the entire set! form is deferred, because it's treated like
> (define dummy (begin (set! VAR EXP) (unspecified))).
Good point. But there is still some awkwardness:
(define VAR (MAC))
(set! VAR (MAC))
(list (MAC))
(MAC)
(define-syntax MAC ...)
The first 3 (MAC) applications are deferred, so are correctly
done using the following the define-syntax.
The 4th (MAC) is not deferred, and so "the wrong thing will
happen".
With my proposal, none of the above would "do the right thing",
but they would all be consistent. It seems wrong for:
(MAC)
and
(car (list (MAC)))
to be different.
--
--Per Bothner
per_at_bothner.com http://per.bothner.com/
Received on Thu Feb 22 2007 - 17:22:08 UTC