> with a delimited continuation, you're capturing it from the outside, so you > don't have that problem. > Yeah I'm pretty sure its possible. I've been intrigued by this continuations based web programming trend as well. Early on when I learned of Clojure I made a very poor attempt to port cl-cont into Clojure, but I have not been able to grasp continuations well enough to do this myself.
I did manage to figure out that cl-cont works by transforming the delimited continuation into Continuation Passing Style (CPS). This is a general transform that can be done in (almost?) any language, and certainly can be done in Clojure. cl-cont defines a subset of Common Lisp in CPS so that the macro system could translate most code into CPS, and from there delimited continuations follow. The complication with Clojure is the possibility of stack overflow due to the lack of TCO. With the new trampoline functionality this could probably be avoided, but I don't understand continuations well enough to really say if that could work. It also may be that for the use cases Jan is talking about, it is very unlikely to blow the stack and so maybe you could just deal with that as a limitation. /mike. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---