[r6rs-discuss] [Formal] Rename named `let'

Eli Barzilay eli at barzilay.org
Fri Jan 26 05:44:03 EST 2007


On Jan 26, Michael Sperber wrote:
> 
> Eli Barzilay <eli at barzilay.org> writes:
> 
> > If you're suggesting:
> >
> >   (letrec loop ([x ...]) body ...)
> 
> That isn't really my preference, but it would be an improvement.
> 
> > then I don't understand how it can work in any intuitive way.  Worse,
> > I find it very common to write
> >
> >   (define (tree-foo foo tree)
> >     (let loop ([tree tree])
> >       ...))
> >
> > which breaks if it was using a letrec.
> 
> I'm probably being dense.  Why would it break?  If you think I'm
> suggesting a "named letrec" should expand into something that
> letrec-binds `tree' (rather than just `loop'), then you're wrong.

Then what does `letrec' has to do with any of this?  You said you
prefer `letrec' for a name, which I don't understand -- the jump from
a plain `let' to a named one is harmless if you don't use the name in
the body, but IIUC, you suggest that:

  (letrec loop ([x x]) x) == (let ([x x]) x)

??  (I must be missing something, because I don't see how *that* can
be considered as an improvement.)

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!



More information about the r6rs-discuss mailing list