tags:

views:

286

answers:

6

So, having just recently learned of Clojure, I'm interested in sinking my teeth into some good ol' functional programming again. What sort of applications would Clojure be good for? Web apps? Windowed client apps? Command-line utilities? What sort of applications is Clojure a terrible solution for?

+1  A: 

Clojure is great for everything that involves a lot of parsing. I would certainly use it for example to analyze log-files. It's also a great language to write DSL's. I probably wouldn't use it for applications that are 90 % GUI stuff. Of course you don't have to pick one single language nowadays. You can use Clojure for part of your application.

Maurits Rijk
Clojure isn't actually all that bad for GUI stuff - since you can just piggy back on all the Java libraries (OpenGL, Swing, Processing etc.). I've written a game GUI in Clojure, worked pretty well.
mikera
+3  A: 

Really, any type of application should be ok. Clojure is a reasonable general purpose language so it lends itself to most things, especially due to it's Java class library support.

Functional programming languages lend themselves well to highly parallel problems, so you might want to look for something in that area. For example, crunching masses of information using a MapReduce approach like Google do...

Sean
+9  A: 

I think the only thing that Clojure may not be good for is one-off command-line scripts. The JVM startup time even when running with the -client flag is not so hot. Projects like Nailgun provide something of a workaround but there are some serious security implications with that approach.

Otherwise I think Clojure is ideal for any task.

dnolen
+1  A: 

I'm fairly new to Clojure too and enjoy using it on math problems where speed is not really an issue. It's just so expressive. It's also very nice to be able to use the extended precision of BigDecimals and BigIntegers transparently - no futzing about with the clumsy constructors and methods that Java requires.

The caveat about speed is really because of my own inexperience. I don't know that it is an issue for the truly skilled. It's also an area that lends itself to parallelization that appears to be so easy in Clojure.

clartaq
A: 

Clojure is well suited to map-reduce style data processing problems that deal with huge data sets. It is being used to great effect for this at FlightCaster.com and Runa. I am using it for cryptography and I have seen it used professionally in a two other network centric startups.

Arthur Ulfeldt
+2  A: 

There is very little Clojure isn't suited for. It's a general purpose language, and is quite suited to nearly any task. Especially concurrency related ones.

Rayne