"Most" Common Lispniks would write an iterative, i.e. non-functional, version, such as the following:(loop for i from 1 upto 10 summing i)
When the most exposure to lisp I had was the usual cursory intro from a comparative languages course and a intro to AI course in college, I had the impression that everything in lisp was always recursion. Having been reintroduced by Paul Graham's ANSI Common Lisp, I was under the impression that doing things like using setq should be done only in emergencies. I forget how he phrases it. Something like pretending that it incurs a cost to the function or something like that. But that's why I'm personally glad that Peter Siebel wrote Practical Common Lisp, as it focuses more on getting useful stuff done, and shows quite a bit of the "just get stuff done" aspects of the language.
Common Lisp and Scheme do come from different communities. I think it is interesting to note that most all the many divergent lisp dialects that were used at one time < http://tinyurl.com/y7puru>, 3Lisp, Flavors, Franz Lisp, Interlisp, Lisp 1.5, LOOPS, XLisp, ZetaLisp, etc., have been subsumed by Common Lisp. However, Scheme remains distinct. I think that is indicative of the differences between the languages and the communities. But like is mentioned in the comp.lang.functional FAQ (ibid):
It is often possible to write functional-style programs in an imperative language, and vice versa. It is then a matter of opinion whether a particular language can be described as functional or not.
If one wants to slide far enough down the slippery slope, even C/C++ could be considered functional languages because one can write such code without using assignment (or iteration (...)).
Corey wrote:I would personally prefer having some room for non-lisp languages, but I would still be ok with constraining ourselfs to lisp ( i.e. no ML or haskel (or erlang ;) ). I would have a issue though if we were to constrain ourselfs to the common lisp dialect.I personally would not have an issue with including many divergent dialects in the lisp family. In fact, I would love it if somebody could get Paul Graham to come talk about Arc, the newest vaporware member of the family. I suppose I would have an issue with a lisp group which was not cognizant of the distinctions, though.
Question. Does Allegroserve *require* you to buy allegro common lisp? You might alienate some potential helpers that way.No. There is Portable AllegroServe <http://portableaserve.sourceforge.net />. It works with:
- CMU Common Lisp
- Steel Bank Common Lisp
- GNU clisp (only single-threaded operation)
- OpenMCL
- Xanalys Lispworks
- MCL
- Scieneer Common Lisp (slightly broken as of 2004-02-29)
- Corman Common Lisp (with non-standard install method, might be broken as of 2004-02-29)
- Allegro Common Lisp
The only reason I mentioned it was that it is an entire HTTP server in CL, as opposed to only part of it, as one would find with something like mod_lisp. But as others have mentioned, there are lots of other alternatives. Personally, I am looking for a lisp group because I like lisp and don't have enough excuse to use it at work. In fact, I think it would be sweet if we could get our hands on an old Symbolics machine and have everything be lisp, from the raw iron all the way up. But I'm strange like that. I don't expect a Linux group to host its web-server on a box running something other than Linux and I like my lisp groups to use as much lisp as possible.
Corey wrote:Also as I mentioned before {in person}, having just implemented a wiki in scheme, I would probably be able to give some guidance if you decide to do a wiki.And there is CLiki < http://www.cliki.net/CLiki> and The Common Lisp Directory < http://tinyurl.com/y3fkb6>, both written in CL.
Corey wrote:This is probably too big of a project, but I'll toss out the idea anyway. What about writing a common lisp "interpreter" in scheme?Yeah, you're right. It probably is too big of a project. Sure, we could knock out the basics of the language, what with lexical scoping and closures coming for free from Scheme, and adding dynamic scoping (special variables) in a few lines of code. Sure, CL style macros would be a day or two at best. Pathnames, logical pathnames, packages, and reader macros aren't even worth mentioning. CLOS would be a week or two. A full meta-object protocol might take another week. Maybe two. Adding CL style conditions would probably be two weeks, maybe three tops. But doing things like getting unwind-protect and call/cc to play well together might be a bit harder < http://tinyurl.com/y8pl6r>.