Tuesday, August 12, 2003

Paul Graham, CPS, Lisp, and Web Services
OK, so the major discussion this week on the lightweight languages list have been continuations. Paul Graham, who I am a big fan of and an extreme Lisp advocate, posted this link to one of his excellent articles. It talks about the way he implemented his web services in lisp and his design decisions. The interesting thing about the article is about how many extreme programming practices that he mentions (do the simplest possible thing, constant testing, test first, customer first, etc) and how a dynamic language can support the whole process. He also mentions using Continuation Passing Style to aid in keeping things in context for multiple invocations of the web services. I can clearly see where Avi Bryant and crew got some of their excellent ideas for Seaside! It also amazes how much the things that I embraced in the Smalltalk community come from the Lisp community. What amazes me even more is how much of this history is lost in the Java and corporate communities. It's amazing how many frameworks I see in Java that are subpar to things that I used in Smalltalk. Anyway, I think the scripting languages did not lose the history lesson and are continuing in the same tradition. I would much rather work in Ruby (or Javascript, Python, etc) than Java anyday of the week. Of course, ideally, I would love to work on Smalltalk full time because my days in that language were very enjoyable even though the circumstances of some of my projects was less than ideal. At least the language never got in my way!

Anyway, I must admit I love continuations now that I have played with them quite a bit in both Ruby and Dolphin Smalltalk. I think they can be easily used for handling contexts in event handling (think about mouse captures for drag and drop!) and any distributed service that needs context between invocations. It's amazing that this gem has been around for a very long time in the Scheme and Lisp communities. I'm even shocked to hear that people have a hard time with them. They seem very natural to me for the problems that we are trying to solve with them now. Nonetheless, they seem to have a bad reputation that I think is not warranted. They were a solution looking for a problem and that problem has been around, but we finally figured out what to do with it....Well, the Lisp and Scheme guys already knew what they were good for....=)

No comments:

Amazon