WHAT: this is a blog where i collect news about the usage of javascript a serious programming language on the client side and server side. WHY: because it seams to be the most ubiquitous language and has functions as first class objects, and closures and ....

Thursday, June 12, 2008

Javascript Continuations

Continuation support may have some advantages to make programming easier.
Imagine simpy having the complete state encoded in the
request and then a call to the server simply continues a function in the
same state where it stopped before.
No need to worries about any back buttons :-)

We know this from cocoons flowscript, but what does exist in pure javascript?

Here you can find a nice intro Continuation-Passing Style by Marijn Haverbeke, the creator of CodeMirror.

An an older post by Steve Yen, the creator of Trimpath Junction, about 'poor man' continuations: continuations-in-mozilla

What do we have to integrate it in javascript?
Well I found Narrative Javascript From Neil Mix
and Kirs Zip forked it to make add co-routines and co-threading possible
Strands, you know the "yield" thing :-) and also see jwacs by James Wright.

In this new post by Steve Continuations For JavaScript, Reloaded he points to Haili Wiki by Kevembuangga and its usage of continuations in a script continuation.js, modififing the function code on the fly..hmmm

No comments: