develooper Front page | perl.perl6.language | Postings from July 2002

Finding closure in the continuous forest

Thread Previous | Thread Next
From:
Mike Lambert
Date:
July 9, 2002 01:44
Subject:
Finding closure in the continuous forest
Message ID:
Pine.LNX.4.44.0207090400330.8874-100000@jall.org
> 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


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About