> 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 my story.

The perl program execution is merely a traveller in a maze-like forest,
searching for the answer to his life's work.  This forest is nested deep
within the valley of a large mountain range surrounding it, preventing
passage out of the forest.

When he passes through some piece of the forest, he can plop down a
teleporter, along with a book describing his exact steps to get there from
where he began. (It's a step up from hansel and gretal.) Later, he can
make a call, and teleport to any of the places he's put down a teleporter,
and continue where the book left off, with all of it's "history".

The forest corresponds to stack memory: every change to the stack, every
function call, and every stack movement corresponds to some movement in
that forest. The surrounding mountain range is the globals and package
data...data not directly in the forest. But no matter how the traveller
moves, the mountains are always visible to him, a reminder of where he is
in the global scope of things.

However, as a nice side-benefit, taking a closure is then nothing more
than leaving a teleporter, but with a book marked 'return to sender' on
it.

I'm not sure how to describe pointers in the forest to the surrounding
mountains, however. Rainbows with a pot of gold at the mountainous end?
Telescopes on the ground which can be moved and rotated?

Mike Lambert

Reply via email to