Message from discussion Scheme vs Lisp! [was Re: web application framework]
Date: Sun, 09 Nov 2003 22:29:10 +0100
Subject: Re: Scheme vs Lisp! [was Re: web application framework]
Content-Type: text/plain; charset=iso-8859-15; format=flowed
References: <Pine.LNX.firstname.lastname@example.org> <XSOqb.143$KR3.email@example.com> <3FABD814.B3D798EF@sonic.net> <Pine.LNX.firstname.lastname@example.org> <x0grb.154$KR3.email@example.com> <firstname.lastname@example.org> <ktvrb.58643$Gq.email@example.com> <firstname.lastname@example.org> <OYvrb.58651$Gq.email@example.com> <firstname.lastname@example.org>
From: Arthur Lemmens <alemm...@xs4all.nl>
Organization: Kikashi Software
User-Agent: Opera7.11/Win32 M2 build 2887
NNTP-Posting-Date: 09 Nov 2003 22:29:14 CET
X-Trace: 1068413354 news.xs4all.nl 58704 18.104.22.168:4238
Pascal Costanza <costa...@web.de> wrote:
> a) I appreciate that most of the time, Common Lisp doesn't
> tell me "that's not the way how you should do things". To the
> contrary, the strength of Common Lisp is that it adapts to each
> and everybody's programming style "in 99% of all cases". It doesn't
> do so in the case of continuations, and that's objectively a
> disadvantage because it renders certain programming styles
I totally agree with this. Continuations are the only thing from Scheme
that I would really like to see in Common Lisp. Fortunately, in Common
Lisp we don't need continuations to implement stuff like condition
handling or multiprocessing. But they do make it a lot easier to use a
non-deterministic programming style when you want to.
Lispers saying "I don't need any continuations, because I can do everything
I want some other way" remind me a lot of the python/functional programmers
saying they don't need macros. Of course they don't really _need_ them.
But they do miss part of the fun (and the power) without them.
> b) Here are some link collection that point to uses of continuations in web servers:
> + http://home.comcast.net/~bc19191/2003_08_24_bill-clementson_archive.html
> + http://radio.weblogs.com/0102385/2003/08/30.html
> + http://radio.weblogs.com/0102385/2003/10/08.html
Yes, I read those (and a couple of articles by Krishnamurti and Felleisen
as well). The trouble with Web programming is that you lose all state after
each interaction with the user, so you're forced to deal with capturing
relevant parts of the state in a way that's not necessary with classical GUI
programming. But it's pretty easy to implement a mechanism that allows you
to use something very similar to the callbacks that you'd use in 'normal'
GUI programming. You only need closures for that, not full continuations.
The only GUI example I can think of that would be a lot harder to solve
without continuations is the bookmarking example in "Advanced Control
Flows for Flexible Graphical User Interfaces" by Graunke and Krishnamurti.
But for that kind of bookmarking, even Scheme-style continuations aren't
enough. Those continuations must be serializable as well, and that's
something that even Scheme doesn't have (at least it didn't the last time
I took a serious look at it).