[r6rs-discuss] Interpreters need not apply?
William D Clinger
will at ccs.neu.edu
Wed Mar 7 19:47:41 EST 2007
I am posting this as an individual member of the Scheme
community. I am not speaking for the R6RS editors.
Abdulaziz Ghuloum wrote:
> Thanks for the pointer. Just to make things clear, what are the 5.92-
> draft requirements that disallow intermixing expansion and
> evaluation? Is it only the requirement to raise a syntax violation
> when certain errors are detected (such as an assignment to an
> exported variable or a reference to an unbound identifier), or is
> there more to it than that?
There's more to it than that. It would take me several
hours to search the draft R6RS for all of the relevant
requirements, but I think there are about half a dozen
places that explicitly require exceptions to be raised
before execution begins. Here are two of them:
section 5.2, page 20, middle of right column:
...an exception with condition type &syntax is raised
at expansion time.
section 5.7, page 22, second paragraph:
If a top-level or library form is not syntactically
correct, then the execution of that top-level program
or library must not be allowed to begin.
IIRC, the R5RS did not mandate any such phase distinctions.
Tom Lord wrote:
> Macro hygiene is one of the great innovations
> to come out of the Scheme world and should be more widely
> appreciated and used, but, the world doesn't revolve around it
> and promoting it to too high a status is surely a distortion.
As I have tried to explain, hygienic macro expansion
(as in the R5RS) is entirely compatible with pure
interpretation of the list structure representation
of Scheme programs.
The phase distinction of the draft R6RS is a recent
innovation that has nothing to do with hygiene. It
may have something to do with low-level macros, but
not with hygiene.
More information about the r6rs-discuss