On Mon, Jul 08, 2002 at 04:54:16PM -0400, Dan Sugalski wrote:
Pretty simple. (For illustrative purposes) To do that with
continuations, it'd look like:
$cont = take_continuation();
if ($foo) {
$foo--;
invoke($cont);
}
take_continuation() returns a continuation
At 04:54 PM 7/8/02 -0400, Dan Sugalski wrote:
A continuation is a sort of super-closure. Like a closure it captures
its lexical variables, so every time you use it, you're referring to
the same set of variables, which live on until the continuation's
destroyed. This works because the variables
could serialize a continuation, you could freeze your
program state to disk and restore it later? Cool, makes for easy
checkpoint/restarts.
Yep. But serializing continuations is either tough, or not completely
doable, since programs tend to have handles on things outside their
direct control
At 10:24 PM +0100 7/8/02, Nicholas Clark wrote:
On Mon, Jul 08, 2002 at 04:54:16PM -0400, Dan Sugalski wrote:
Pretty simple. (For illustrative purposes) To do that with
continuations, it'd look like:
$cont = take_continuation();
if ($foo) {
$foo--;
invoke($cont
Thus it was written in the epistle of Peter Scott,
So if you could serialize a continuation, you could freeze your program
state to disk and restore it later? Cool, makes for easy checkpoint/restarts.
I think that that would be true only if *all* data was maintained in those
scratchpads
101 - 105 of 105 matches
Mail list logo