[r6rs-discuss] Proposed features for small Scheme, part 1: a stake in the ground

Abdulaziz Ghuloum aghuloum at gmail.com
Sun Sep 13 21:26:24 EDT 2009


On Sep 14, 2009, at 12:29 AM, Andre van Tonder wrote:

> No, I cannot think of a way to do so without a second pass.

Let me try to summarize your position to see if I'm following
correctly.

(1) You say that the following "is an error" under one-pass:

(let-syntax ((f (syntax-rules () ((_) 1))))
   (let ()
     (define (g) (f))
     (define (f) 2)
     (g)))

(2) You say that the following is "of course not an error"
under one pass and should return 2:

(let ((f (lambda () 1)))
   (let ()
     (define (g) (f))
     (define (f) 2)
     (g)))

(3) You don't think it's possible to expand and rename to get the
behavior in (2) without some sort of lookahead "subpass", or a
separate global renaming pass.

Am I correct in the above?

Aziz,,,



More information about the r6rs-discuss mailing list