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

Re: [Scheme-reports] 5.3 Syntax Definitions

On Thu, Jun 2, 2011 at 7:20 PM, Alex Shinn <alexshinn@x> wrote:
On Fri, Jun 3, 2011 at 12:20 AM, Jonathan Kraut <jak76@x> wrote:
> I hope WG1 will reconsider lifting the restriction that "any internal
> syntax definitions in a body must come before any internal definitions."

This was brought up earlier and we're open to
changing it, subject to the restriction that using
a syntax definition before the definition is an error.

We also need to specify the result of redefining
internal definitions (as syntax or otherwise).  The
R6RS is unclear on this - I'm inclined to just make
it an error.

R6RS *tried* to cover this, but it was difficult to interpret, especially in the context of the detailed expansion semantics:

"A definition in the sequence of forms must not define any identifier whose binding is used to determine the meaning of the undeferred portions of the definition or any definition that precedes it in the sequence of forms." 

But it did not go into detail about what constitutes "meaning".

I don't want to have an R6RS conversation, only to request that the WG be better than R6RS was about the wording it uses.    What does it mean to "use a syntax definition" and what does "before" mean?   Must everything be expanded in left-to-right order - and if so, how does one handle the even?/odd? example?   Can there be a reference to an identifier in the template part of syntax-rules that resolves to a definition that comes later?

-jim rees

Scheme-reports mailing list