[plt-scheme] serializable continuations

From: Maarten Koopmans (maarten at vrijheid.net)
Date: Fri Feb 9 16:00:55 EST 2007

Matthias Felleisen wrote:
> On Feb 9, 2007, at 3:29 PM, Maarten Koopmans wrote:
>>> Longer version: here's how to do it (link to the paper Matthias  
>>> aluded to):
>>> http://www.cs.brown.edu/~sk/Publications/Papers/Published/pcmkf- 
>>> cont-from-gen-stack-insp/
>> OK, I have been trying to wrap my mind around it. Trying... I am  
>> missing theoretical background (once upon a time educated as a  
>> physicist, different math).
>> What I get from the paper is that you can install continuation  marks 
>> (marks on the stack) and that you can jump to them; the same  model 
>> works with exceptions. In both cases the marks provide  closures 
>> (either implemented as object or...)
> Don't put closures there, or at least not lambdas-evaled-to-closures.  
> Put representations of closures there (structs) that you can then  
> serialize.

Aha, now I get the representation of closures as (serializable) objects 
in the C# example. I need to think let this sink in a bit; especially 
the code-transforms (section 3 of the paper) are hard without the 
theoretical background, but it is fun thinking about this. "Thoughts 
previously not thought possible" :-)


Posted on the users mailing list.