On Wed, 2009-09-16 at 10:19 -0400, Aaron W. Hsu wrote:
> On Tue, 15 Sep 2009 22:31:53 -0400, Ray Dillinger <[email protected]> wrote:
>
> > This is why I argue that the proper time for expansion of macro calls
> > is the first time the code containing them is executed.
>
> Will not doing so require the tracking and recollection of excessive
> amounts of state within the Scheme system with snapshots of the state at
> each definition, and potentially altering every evaluated expression which
> has an indirect relationship to the not yet expanded definition expression
> (which, of course, can't be determined without first expanding it far
> enough to see that it is a definition, in which case you have potential
> state issues regardless).
Yes. It would in fact require tracking and collection of all that
state information, and implementing it would be darned picky. I
think it's the most consistent possible semantics, but consistency
is only one of the priorities people have here and this would
sacrifice many other things (starting with phase separation) on
the altar of consistency.
I am not arguing that execution-time macroexpansion is right for
Scheme. All I say is that it is the most consistent semantics.
Because we intend not to do execution-time macroexpansion, we
have to decide what inconsistencies we will tolerate and what
benefits are worth it.
Bear
_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss