[r6rs-discuss] Interpreters need not apply?
| From: Pascal Costanza <pc_at_p-cos.net>
| Date: Wed, 7 Mar 2007 16:05:53 +0100
|
| On 7 Mar 2007, at 15:51, AndrevanTonder wrote:
|
| > On Wed, 7 Mar 2007, Pascal Costanza wrote:
| >
| >> The terms "compiler" and "interpreter" are not well-defined. But
| >> AFAICT, a compiler typically works in two phases: A translation
| >> from one representation to another one, where the latter is
| >> typically a representation that can be executed by some
| >> interpreter (for example, a CPU).
| >
| > No r5rs-conformant Scheme interpreter will start evaluating a
| > form without macro-expanding it first. R6RS requires nothing
| > more than this.
|
| Here is an example:
|
| (if expression form1 form2)
|
| Assume that both form1 and form2 are macro invocations. Will form1
| and form2 both be macroexpanded before the if statement is
| evaluated, or will first the expression be evaluated and depending
| on its outcome only either form1 or form2 be expanded and then
| evaluated?
In SCM, only form1 or form2 will be expanded and evaluated.
Received on Wed Mar 07 2007 - 13:07:10 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC