continuations

OOPSLA

November 7, 2004 14:31:44.603

I wasn't able to make it to OOPSLA this year (ironic, since it was in my home town of Vancouver). But there was apparently a successful Seaside BOF, and I just came across this flattering reference to it: Nat Pryce writes

Wow!

Seaside makes writing web apps startlingly simple and straightforward. In comparison, web app frameworks in the Java world, such as JSP or Struts, and even Ruby on Rails look like dinosaurs.

Thanks, Nat.

He then makes a great point about the relative philosophies of Java and Smalltalk at a language level, and how that affects the APIs built on top of them:

Seaside is able to present such a simple API because it takes advantage of "esoteric" features of its implementation language/platform, Smalltalk, such as continuations and closures. Java, in comparison to Smalltalk, is designed on the assumption that programmers using the Java language are not skilled enough use such language features without making a mess of things, and so the language should only contain simple features to avoid confusing our poor little heads. Paradoxically, the result is that Java APIs are overly complex, and our poor little heads get confused anyway. Seaside is a good demonstration that powerful, if complex, language features make the job of everyday programming easier, not harder, by letting API designers create elegant abstractions that hide the complexity of the problem domain and technical solution.

Comments

[Reg K] November 7, 2004 15:23:05.868

I was at the presentation and it was very interesting. Of more interest is the fact that an architect from Orbitz was also present. He was very interested in what he saw. He plans to investigate it further. Other than the fact that it was written in Smalltalk his major questions were (1) how fast was a Squeak or VW VM versus a Java VM and (2) how much memory does the stack copying consume.

[] November 30, 2004 12:02:57.777

Note that a continuation does not copy the stack, it just stops the stack frame from being garbage collected while the continuation is in existence.