Per Bothner scripsit:
> >>>Eliminating the distinction between library bodies and toplevel bodies
> >>>also allows a simplification in both description and understanding.
> >>Why not go further: relax ordering constraint on *all* bodies?
> >
> >Sounds good to me, provided the current semantics (all definitions
> >are reordered before expressions) is maintained.
>
> Huh? Any side-effects should be in the order as in the file, which
> matches the existing specification at the end of section 8.
Okay, let me try to straighten this out. Here's what I think R5.92RS
says:
In a body, the syntax is <definition>* <expression>+. The semantics are
explained by translating the body into a letrec* in which the definitions
become bindings and the expressions remain expressions.
In a library body, the syntax is <definition>* <expression>*.
The semantics is also that of letrec*, but we add a dummy expression if
there are none. Furthermore, we splice in any begin-expressions.
In a top-level body, the syntax is { <definition> | <expression> }*.
The semantics are explained by splicing in any begin-expressions, and
then converting each expression into a definition of a fresh identifier,
and finally processing the whole thing as a library body.
My proposal was to reorder library bodies so that all definitions were
at the top, and then proceeding according to R5.92RS. I thought you
were proposing to extend this to plain bodies as well.
I think you are saying that all three types of bodies should be treated
according to the rules for top-level bodies. I am not sure what I think
of that.
--
It was impossible to inveigle John Cowan <cowan_at_ccil.org>
Georg Wilhelm Friedrich Hegel http://www.ccil.org/~cowan
Into offering the slightest apology
For his Phenomenology. --W. H. Auden, from "People" (1953)
Received on Thu Jan 25 2007 - 15:07:29 UTC