[plt-scheme] about letrec and continuation : which behavior is correct ? and why ?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Wed Aug 20 12:00:00 EDT 2008

On Aug 20, 2008, at 11:57 AM, Sam TH wrote:

> Note that this rules out the following code:
>
> (define (f x)
>   (define local-var (add1 x))
>   (define (do-stuff . args) ...)
>   (do-stuff x local-var))
>
> which I think would be a big loss.  What precisely are we gaining by
> restricting `letrec'?

Don't get me started on internal define.

How about an Algol semantics for this kind of block. You get your  
cake, and I eat it. Or something like that. -- Matthias



Posted on the users mailing list.