Brian Candler wrote:
> On Wed, Aug 06, 2003 at 08:38:25PM +0900, Harry Ohlsen wrote:
> 
>>I'd be interested to read about some real-world examples where people have
>>used callcc, not just to try it out, but because it was the "right" way to
>>do something (for efficiency, or code brevity or whatever reason).
> 
> 
> I think Seaside/Borges falls into this category.

Yup, absolutely.

> I haven't had a chance to use it in anger, but I think the idea is that
> continuations can represent CGI session state; you code can be written in a
> linear fashion (e.g. display page, fetch response, display next page, fetch
> next response etc) without any explicit session maintenance. Furthermore, by
> retaining continuation objects which represent earlier pages, it will work
> even if the user clicks 'back' in their browser and re-enters data in a
> previous form.

That's a pretty decent summary.

> I'd have a number of concerns in a practical application - I'd want old
> continuations to expire and be garbage-collected so that they don't cause
> infinite memory growth - but otherwise it sounds like a great way to write
> web applications.

They certainly are expired and GC'ed.  And you can control how many 
continuations you keep around for a particular session.  You can also 
control how long sessions hang around - or you could swap them to disk 
and keep them forever.  Again, this is all speaking about the Smalltalk 
version since I haven't seent he Ruby code in quite some time and it may 
well be true that you have less control of these things there.

If anyone's interested in discussing Seaside or the benefits of 
continuations further, the Seaside (Smalltalk people but others welcome) 
community is all on the mailing list which you can sign up for at:

http://lists.squeakfoundation.org/listinfo/seaside

Cheers,

Julian