[r6rs-discuss] Expansion process
per at bothner.com
Thu Feb 22 17:22:08 EST 2007
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))
(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
With my proposal, none of the above would "do the right thing",
but they would all be consistent. It seems wrong for:
(car (list (MAC)))
to be different.
per at bothner.com http://per.bothner.com/
More information about the r6rs-discuss