At 11:18 PM 1/12/2004 -0500, Michal Wallace wrote:On Mon, 12 Jan 2004, Luke Palmer wrote:A continuation is one snapshot -- it never changes, it never runs. To invoke the continuation is to take you back to that snapshot and start running from there. To invoke it a second time is exactly like invoking it the first time.
Thanks. I'd heard this a million times but putting it this way made it click for me.
One important addition:
While continuations are snapshots of execution context (execution path and variables), they are not snapshots of values.
References to globals or lexicals will be restored as the snapshot, but their values can change.
As will references to strings and PMCs that are on the stacks but not in globals or lexicals.
Unfortunately ints and floats on the stacks *are* snapshots, which is somewhat problematic in some cases.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk