[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: are we there yet?


On 16 Apr 2002 14:56:06 -0400, Bruce Lewis <brlewis@alum.mit.edu> wrote:

> Dorai Sitaram <ds26@gte.com> writes:
> > Isn't anybody going to rage, rage against the
> > dying of the lightweight language list?
> I hereby warn this list that if I don't see some intelligent discussion
> about getting innovative language features into the hands of working
> programmers, I'm going to talk about BRL again next week.  I mean it!

Christopher Oliver <coliver@mminternet.com> has done quite an
interesting job in adding continuations to the Rhino JavaScript

He started by initially implementing the call/cc equivalent, but
because of scoping issues in JavaScript, he decided to go with a
different approach.

He created a Continuation first class object, which when instantiated,
holds the continuation of the enclosing function. Using this approach,
call/cc could be implemented like this:

function callCC(func)
  var k = new Continuation();

He also modified Rhino to support (almost) proper tail call
optimizations, so the above implementation of call/cc will not eat any
space on the stack.

He's now working on implementing a facility similar with

You can download his modified Rhino implementation from:


Based on his work, I've started extending Apache Cocoon (an XML
oriented publishing framework) with continuations support, as
described in various papers by Christian Queinnec, and Paul Graunke et


You can take a look at this implementation on the Web at:


Ovidiu Predescu <ovidiu@apache.org>
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)