views:

542

answers:

5

I'm looking for a fast language (ie. a language that can be compiled natively to achieve performance not more than 3 or 4 times slower than C), which supports portable continuations. By this I mean a continuation that can be serialized on one computer, and deserialized on another.

I know that SISC can do this (a Scheme implementation in Java), but its slow. Ditto for Rhino (a Javascript implementation in Java).

+6  A: 

Did you checked OCaml ? It can be compiled and should be marginally slower than C.

Continuations and delimited control

Robert Vuković
+2  A: 

Its possible to do serializable continuations in Java using Apache JavaFlow - if you do go that route then the Swing Continuations library at:

http://www.exploringexcellence.com/swingcontinuations/download.html

makes it the coding a lot more pleasant.

tonys
+3  A: 

While I agree that dialects of Caml might be an excellent choice I feel I have to mention Gambit Scheme. Together with Termite, an erlang-like framework it has support for serializing continuations, sending them over the wire, and much more.

http://dynamo.iro.umontreal.ca/~gambit/wiki/index.php/Main_Page

It compiles to C-code.

JBF
+1  A: 

Scala 2.8.0 will allow continuations, and they'll be portable.

Scott Morrison
+4  A: 

Just coming back to this in-case anyone else has the same question. The language I eventually settled on is Scala, which has a compiler plugin in version 2.8 (still a work-in-progress at the time of writing) which supports portable delimited continuations.

sanity