[r6rs-discuss] [Formal] Remove double phase semantics
Andre van Tonder
andre at het.brown.edu
Tue Nov 14 10:49:25 EST 2006
---
This message is a formal comment which was submitted to formal-comment at r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Name : Andre van Tonder
Email : andre at het.brown.edu
Type : simplification
Priority : medium
Component : libraries
Version : 5.91
Pages : 24
Dependencies: None
Summary:
--------
Libraries can be greatly simplified by removing current
double choice of phase semantics.
Description:
------------
The current phase semantics is very complicated and
the choice of two separate semantics hinders portability.
A simpler semantics is already effectively implemented by
two of the reference implementations. This semantics shares
one set of bindings between all the levels into which they
are imported.
The visit/invoke semantics becomes HUGELY simplified in
this case.
--------------------------------------------------
Note that the following is *equivalent* to the
current draft when the bindings are shared.
It is what the "dybvig-ghuloum" and "vanTonder"
implementations already effectively do.
--------------------------------------------------
To visit a library:
* Visit any library that is imported by
this library and that has not yet been visited.
* For each k >= 1, invoke any library that is
imported by this library for .... (meta k), and that has not
yet been invoked.
* Evaluate all syntax definitions in the library.
To invoke a library:
* Invoke any library that is imported by this
library and that has not yet been invoked.
* Evaluate all variable definitions and expressions
in the library.
More information about the r6rs-discuss
mailing list