3 ms·
If you're looking for a practical language with which you can quickly build real-world applications, I would vote for Clojure, simply because it has a wealth of
by dkersten 17y ago
If you're looking for a practical language with which you can quickly build real-world applications, I would vote for Clojure, simply because it has a wealth of libraries readily available through Java. Having said that, I haven't got a lot of experience with Haskell and certainly not with its libraries, so I don't really know how it compares, besides the fact that Java has a huge amount of libraries for just about anything you could want.
This also means that you can write web apps in Clojure and deploy them on one of the many Java-based web platforms - that is, its reasonably easy to get your Clojure (or rather, JVM) based web app out there.
If you do decide to go for Clojure, the defacto web framework is Compojure, which is a very simple, but powerful and flexible, framework. It has some nifty features, such as allowing you to write HTML using s-expressions instead of XML tags resulting in much simpler and shorter HTML. Clojure also has a library which helps you to write Javascript in an integrated Clojure-esque s-expression based way called Scriptjure. All in all, Clojure + Compojure + Scriptjure provides a consistent and integrated framework for developing rich web apps. You can be up and running in Jetty within moments and with a few minutes of preparation, you can compile your app as a .war file ready for deployment in something like Apache Tomcat.
The only thing that takes some Java API knowledge is interfacing with a database, though afaik theres some Clojure wrappers for that too. If you don't mind looking through some Javadoc and want some NoSQL goodness, I'd recommend grabbing the MongoDB Java Driver. It happened to be the first Java API I tried to interface with in Clojure and I was pleasantly surprised at how hassle free and easy it was to get it to work.
Whatever you choose, good luck! It should be fun to get into functional programming after working with C and Python :-)
- brehaut 17y agoThis also means that you can write web apps in Clojure and deploy them on one of the many Java-based web platforms - that is, its reasonably easy to get your Clojure (or rather, JVM) based web app out there. Including App Engine (and thus you can also write bots for Wave) http://elhumidor.blogspot.com/2009/04/clojure-on-google-appengine.html http://elhumidor.blogspot.com/2009/04/clojure-on-google-appe...