[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Features you would like to see
- From: Mark Hamburg <mhamburg@...>
- Date: Tue, 21 Aug 2007 16:59:53 -0700
on 8/21/07 4:50 PM, David Given at dg@cowlark.com wrote:
> Mark Hamburg wrote:
> [...]
>> The Scheme answer is that you get to return again from handleClicksOn.
>
> What does that do? The closure's already has a dynamic chain (it's been called
> from somewhere). If you return to the original method, don't you end up
> abandoning that entire dynamic chain and cloning the one you had originally
> when the closure was created? Which, presumably, has all kinds of stale state
> and will do generally unuseful things...
Really. Scheme will keep the dynamic chain around as long as the
continuation exists and you can return up the chain again. It's interesting
for implementing things like backtracking. Or think of it as setjmp/longjmp
taken to its logical conclusion.
Mark