On Tue, 8 Sep 2009, John Cowan wrote:

> Andre van Tonder scripsit:
>
>> In any case, macro forward-reference is probably the first thing that will
>> have to go if small Scheme is to be REPL-compatible.
>
> Indeed, and this is what worries me about the compatibility between
> Thing One and Thing Two.  If Thing One is to have R5RS semantics in
> both its REPL and its libraries, and Thing Two is to have the R6RS
> semantics of top-level programs and libraries, then Thing One libraries
> will be neither upward nor downward compatible with Thing Two libraries.

No, if there is to be a Thing Two, they will have to be compatible.  It
really is a small change (simply disallow forward uses of macros) that
significantly simplifies the expansion process (from 2-pass to 1-pass)
by disallowing a corner case that is hardly ever even used by anybody.

One pass is simpler for users to understand.  Insisting on two-pass expansion
in R6 is very much like insisting on two-pass for evaluation, e.g.,
insisting that

   (display x)
   (define x 1)

should work just because the display is in the region of visibility of
the binding.  No Schemer today has this expectation for definitions.
Neither should they for syntax definitions.  The fact that you
can make more things work with more passes does not mean it should be
done.

Andre

_______________________________________________
r6rs-discuss mailing list
[email protected]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss

Reply via email to