Finding closure in the continuous forest

2002-07-09 Thread Mike Lambert
Perhaps we should just explain continuations in terms of time travel. Most people think they understand time travel, even when they don't. A continuation is just a funny label for a point in time, and you have a way of sending messages from the future back to that point in time. Hrm...here's

Re: Continuations for fun and profit

2002-07-09 Thread Ted Zlatanov
On Mon, 8 Jul 2002, [EMAIL PROTECTED] wrote: Yep. But serializing continuations is either tough, or not completely doable, since programs tend to have handles on things outside their direct control like filehandles, sockets, database connections, and suchlike things. Resuming a continuation

Re: Continuations for fun and profit

2002-07-09 Thread Peter Haworth
On Mon, 8 Jul 2002 16:54:16 -0400, Dan Sugalski wrote: while ($foo) { $foo--; } Pretty simple. (For illustrative purposes) To do that with continuations, it'd look like: $cont = take_continuation(); if ($foo) { $foo--; invoke($cont); } When

Re: Continuations for fun and profit

2002-07-09 Thread Peter Haworth
On Tue, 9 Jul 2002 16:42:03 +0100, Peter Haworth wrote: When you invoke a continuation you put the call scratchpads and lexical scratchpads back to the state they were when you took the continuation. If you restore the lexicals, how does this ever finish? Never mind. It's the *access* to