Thursday, April 07, 2005

Ruby, continuations, the web and you

Amit Rathore at ThoughtWorks got me interested in using continuations in web applications. Gregor Hohpe did some interesting work there moving away from the call stack in program design.

Keeping in line with these approaches, I ran across a great link posted to the Ruby Talk mailing list: Continuations on the Web.

Ruby, unlike Java, has full native continuations and call/cc ala LISP. This makes for some really interesting code, mind-bending and very rewarding. For web programming, it moves you away from a messaging model to more traditional program flow: you get to code linearly, but the program is still multiplexed in the web way.

There is a great future for futures.


(I had trouble with the link. A bright spark suggested the wayback machine.)

1 comment:

Wilkes Joiner said...

Wee is an attempt to do a Seaside type framework in Ruby. It breaks down when it comes to using continuations. It may cause a memory leak due to Ruby's "conservative garbage collection." There is some discussion about this on the ruby mailing list with a response from matz stating that it is a GC isssue. I would not let that dissuade you from taking a look at Wee. It is an outstanding component based framework.