Continuations and MS CLR

Neel Krishnaswami neelk at brick.cswv.com
Sun Aug 20 11:29:59 EDT 2000


Andrew Kuchling <akuchlin at mems-exchange.org> wrote:
> 
> 2) Second, they add a module for creating continuations.
> Continuations are an idea most commonly seen in Scheme and ML [...] 
> Continuations allow storing the state of a running function and
> resuming its execution later; a stackless bytecode interpreter is
> required to make it possible to implement them at all.  Continuations
> are a fundamental building block in that other abstractions such as
> generators and coroutines can be built on top of them. [...]
>
> Essentially you'd need to rewrite a Java VM to be stackless, and
> JPython would then require this VM to run.  I don't know if
> Microsoft's Common Language Runtime would make continuations easy or
> difficult.

Microsoft's Common Language Runtime includes no specific instruction
for call/cc, but does have an instruction for doing a tail call. This
is just enough support to do call/cc, because tail calls let you
compile code with call/cc efficiently via an explicit continuation
passing style. 


Neel



More information about the Python-list mailing list