Is functional programming relevant to web development?
Pure functional programming might not map very well into the web programming environment. But the main impediment is just the lack of infrastructure (frameworks and APIs). It will be a long time (probably never, honestly) before a functional language has as rich a web programming environment as Java, Python, or Ruby.
That said, there are some options.
- HAppS - a Haskell web application server
- Haskell Server Pages
- Links - a functional web programming language
- mod_caml - an OCaml CGI module for Apache
- Ocsigen/Eliom - an OCaml web server/programming framework
- OPA - a commercial web application framework
- Yesod - a web framework for Haskell
I don't have any experience with any of these. Maybe commenters can weigh in on what's worked well for them.
I don't see why not - so long as you're delivering standards-compliant HTML to browsers, they don't care what you used to produce it, be that a functional language, an imperative language, or trained monkeys.
Functional programming matches web apps very well. The web app recieves a HTTP request and produces a HTML result. This could be considered a function from requests to pages.
Compare with desktop apps, where we typically have a long running process, a stateful UI and dataflow in several directions. This is more suited to OO which is concerned about objects with state and message passing.
A few examples off the top of my head:
- Yahoo! Store is powered by Lisp (originally named Viaweb prior to acquisition)
- Reddit was fully prototyped in Lisp, although they switched to Python in 2005
- Hacker News is written entirely in Arc (a Lisp dialect)