[racket-dev] `letrec' and continuations

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Fri May 20 19:28:12 EDT 2011

On Fri, May 20, 2011 at 6:21 PM, Matthias Felleisen
<matthias at ccs.neu.edu> wrote:
>
> On May 20, 2011, at 7:17 PM, Matthew Flatt wrote:
>
>> I see no reason to change `letrec'.
>
> I think letrec's behavior with call/cc on the right-hand side exposes ref cells and that will bite us again and again. That's why I think changing it would make sense. Then again, the bites are rare, subtle, and probably barely noticable in most cases.

To solve this problem, we could consider having #lang racket's letrec
be different than #lang scheme's or the internal, result-of-expander
one.

We do this already for lambda (well, #lang racket/scheme's lambda is
different than the fully expanded one) so the confusion that results
when people write programs that process fully expanded source is
already there.

And I expect that few people actually write programs that rely on the
"I can grab a box" (unless they are solving that puzzle :) so maybe it
is okay to change the language to avoid these problems?

Robby


Posted on the dev mailing list.