Hacker News new | past | comments | ask | show | jobs | submit login

Some people love Clojure specifically because it sits on top of Java and gives them access to their favorite Java libraries. Frankly, I have yet to find a Java library I'd actually want to use. Something about Java seems to turn every library into an insanely complex explosion of classes, and Java programmers mistakenly seem to think that JavaDoc-produced lists of every single class and method constitutes "good documentation".

Amen!




True, and eff-you-forever Taligent for unleashing this stylistic horror on the world.

But the flipside of this is positive. It feels incredibly good to take a Java library down into your mad scientist workshop and come back out with a beautiful, functional, efficient, and useful interface to a previously ugly library interface. A great example of this is how most Clojure programmers use Jetty. Just pass in a lambda!


It's more the ability to deploy my apps into a Java environment that we like. Yes, it is possible to deploy CL/Scheme in production, and lots of smart people have done it successfully. With Clojure, I can build my app into a .JAR, and deploy it on most desktops. Also, a typical enterprise sysadmin will have no problem putting this into a J2EE (pays the bills) technology stack.


> Frankly, I have yet to find a Java library I'd actually want to use.

http://en.wikipedia.org/wiki/Sturgeon%27s_Law says "90% of everything is crap".

On the JVM that number might be a bit higher, but there are some excellent gems in there too. Lucene comes to mind especially; there's nothing like it on any other platform.


Love it or hate it, Java's back catalog of libraries is gargantuan. One of the biggest obstacles in getting a new language adopted is library support. The fact that Clojure gets all that for free is a way to get people using the language now. As Clojure matures, I'm certain more and more native libraries will emerge negating a lot of the need for Java.


quantity != quality


I absolutely agree, but if you have no choice but to cooperate with the usual "enterprise" hodgepodge with its myriads of standards and protocols, not having to write something that will allow you to do that, is a huge benefit.

You'll have to suffer the environment, you don't have to suffer the language.

But I think it's going to be interesting whether the clojure community will re-write the innards of the libraries they're wrapping already. Will we see e.g. compojure that's turtles all the way down?


Many huge Java frameworks are painfully over-complex, but personally I make good use of a lot of "tiny" Java libraries. e.g. if I want to calculate an MD5 checksum or pluralize a word, there's usually a bit of Java out there for that already. Joda-Time is a good example of a clean Java library that's fairly painless to use from Clojure.

And then sometimes people have written Clojure wrappers around Java frameworks. Ring/Compojure as a thin layer over Java servlets is a good example. clojure.contrib.sql is a thin wrapper around JDBC, so that Clojure can already talk to a wide variety of databases.

In that case you get the benefit of a solid codebase as well as the benefit of a clean Lispy interface. Not sure how much more you could ask for. It would likely take years to reproduce all of that work in pure Clojure.


I was going to cite exactly the same paragraph here :))




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: