[Seaside] continuations resources

Jason Johnson jbjohns at libsource.com
Fri Oct 13 17:07:50 UTC 2006


Ramon Leon wrote:
> Quite literally, a continuation is a GOTO.

Kind of, but unlike virtually every language that uses GOTO, in a 
continuation you define the goto "tag" on the fly and then return to it 
later.

How I like to think of a continuation is how operating systems (sensible 
ones anyway) handle memory paging/swapping.  A process is running along 
happily and then it tries to access a part of memory that has already 
been swapped to disk.  This generates an exeption into the OS who 
basically puts this process to sleep.  The OS then does what it needs to 
to ensure the call will work (i.e. swaps something else that hasn't been 
used recently onto disk, pulls the memory off disk and stores it in this 
newly reclaimed space, etc.) and then wakes the process back up.  From 
the process' point of view he just tried to access a part of memory and 
it worked.  He has no idea, and no way (well no easy way) to know that 
he was put in suspended animation until the illusion of the world he 
expects could be properly built for him.


More information about the Seaside mailing list