[r6rs-discuss] Interpreters need not apply?
Hi,
Abdulaziz Ghuloum <aghuloum_at_cs.indiana.edu> writes:
> Aubrey, what's this class of "pure interpreters" that you're concerned
> about? How do they semantically differ from say petite, csi, gsi,
> mzscheme, guile, gosh, rscheme, etc?
The starting point of this discussion was this statement by William
D. Clinger:
| The language described by the draft R6RS cannot be
| implemented by a pure interpreter (*). Lexical checking,
| macro expansion, syntax checking, bound-variable checking,
| and immutability checks are required before any part of a
| program can begin its execution.
So I believe that R6RS _can_ indeed be implemented by an interpreter.
However, it requires interpreters to systematically perform all the
aforementioned operations _before_ it can start running the program.
Technically, that would turn the "interpreter" into a "compiler", with
clearly distinct phases. This is in contrast with the approach
currently used by, e.g., SCM and Guile, where macro expansion, variable
lookup and the likes are all performed lazily, as the code is evaluated.
It would probably be unreasonable for such interpreters to implement
macro expansion, syntax checking and variable lookup phases as a
separate phase that is systematically executed before the program code
is actually run: it would make startup unacceptably slow.
One might argue that an option for interpreters would be to offer the
possibility to toggle between "lazy compilation/evaluation" (as they
currently do) and the compiler-like, split-phase approach that is
mandated by R6RS: the latter could be used during the program
development phase, and the former could be used when using the program
in "production" systems. However, this effectively requires
implementors of interpreters to provide... a compiler.
Thanks,
Ludovic.
Received on Wed Mar 07 2007 - 07:51:07 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC