I wonder if some functional languages are used for web development and which are most useful and supported with that goal?

- 136,269
- 10
- 221
- 346

- 524
- 5
- 18
-
1Neither Common Lisp nor Scheme are functional languages. Try one of the many Erlang/Haskell web frameworks. – Vijay Mathew Sep 16 '10 at 03:39
-
6@Vijay Mathew: The Lisps are functional. While they technically multi-paradigm, they definitely allow a programmer to be purely functional if he so wishes. – Greg Sep 17 '10 at 00:10
-
@Greg so does C. (think function pointers :-)) – Vijay Mathew Sep 17 '10 at 04:29
-
5@Vijay Mathew: I suppose my counter in this argument would be http://lambda-the-ultimate.org/node/2539#comment-38348 but I suspect that you realize that. Within the context of this question though, I'd still argue that Scheme and Common Lisp can be considered functional programming languages, which I probably wouldn't say of C. – Greg Sep 17 '10 at 11:04
-
1Oh wow, return of the "Foo isn't functional" argument: http://stackoverflow.com/questions/3527753/. Count me out of this argument! – Frank Shearar Sep 20 '10 at 08:11
-
Agreed with Frank. Vijay, Greg, please take this argument to the Smalltalk threads. ;-) – Owen S. Sep 26 '10 at 21:52
6 Answers
PLT Racket has a web server- it's an up-to-date, actively developed Scheme offshoot, and may be something that you want to look into. Here's some documentation:
http://docs.racket-lang.org/web-server-internal/index.html
There are a few StackOverflow threads that can provide some more answers to this:
state of web development using functional programming language
What are the popular 'web-ready' functional programming languages?
- BKNR, a Common Lisp web application environment
- Hunchentoot, a Common Lisp web server
- Lisp-on-lines, a Common Lisp web framework
- Parenscript, a Common Lisp -> Javascript translator
- UnCommon Web, a Common Lisp web framework
It's safe to say there's a fair bit of server side stuff going on for Common Lisp!
Update: In my newsfeed this evening, compliments of Xach: A Common Lisp Web Development Primer, Part 1

- 17,012
- 8
- 67
- 94
Clojure is a very promising choice for server-side web development.
Key advantages:
- It's a Lisp (see Paul Graham's "beating the averages" essay on why this is important)
- You get access to the full Java ecosystem of libraries - this is a huge advantage for server-side development (since the Java library ecosystem is second to none)
- It offers high performance - always compiled, takes full advantage of the JVM for optimisations etc. On the benchmarks game it is the second fastest dynamically typed language (after Common Lisp)
- You can use ClojureScript (basically Clojure that compiles to JavaScript) on the client side for and end-to-end client server solution.
Currently the leading Clojure web framework is probably Noir (http://webnoir.org/) but there are various others starting to emerge.
Erlang is a functional language used (among other many things) for server side web development, e.g.
As for Common Lisp frameworks, see Best web framework in Common-lisp?
Hunchentoot is a nice webserver for CL. CL-WHO is an HTML generation library, and there is a mod_lisp for apache I think too. You can set up something with cl-fcgi, and have a server connect to it, like a CL-WHO + cl-fcgi setup, or cl-who + hunchentoot, or cl-who + mod_lisp. I'ts your choice.

- 57
- 1