Can you really compile Clojure into .class files? I was wondering that the other day, and the conclusion that I reached was that it doesn't work that way.
Yes you can: http://groups.google.com/group/clojure/msg/58e3f8e5dfb876c9
(It's new!)
Re:Clojure adds AOT compilation
by markessien on Friday November 14, 2008 @10:58AM
(#364399)
Should we take a bet on that? I say that with no extra framework coming up that utilizes clojure, clojure will forever remain a small niche product.
Frameworks are big in Java-land because you need an enormous amount of scaffolding to make any non-trivial application work. That's less true in other languages. Libraries and interoperability with other languages are more important, and where LISP has traditionally suffered. Clojure has a lot of potential, but there are a lot of languages poised in the wings right now, all jockeying to be the next big thing. F# for example is functional (it's descended from OCaml) and has full access to the .NET libraries, which are as comprehensive as Java's, and has the backing of a major vendor. Now if Sun were to pick up Clojure and make it the official functional language on the Java platform, that would be something.
> Should we take a bet on that? I say that with no extra framework coming up that utilizes clojure, clojure will forever remain a small niche product.
I'm not sure how Clojure will play out but remember it's only a few years old. You could have said the same thing about Ruby in 1997.
Clojure's first birthday was just a few weeks ago.
Re:Clojure adds AOT compilation
by whacked_new on Monday November 17, 2008 @02:37AM
(#366674)
I take your bet.
Re:Clojure adds AOT compilation
by markessien on Monday November 17, 2008 @06:42PM
(#367546)
Alright, find me in a few years and claim the reward.
Clear benefit: you have Java at your disposal, while being "new and cool." From a library standpoint it is Java + extras.
Functional does not make it better: if there are two types of people, one that prefers functional, one imperative, go ahead! Let the functional use clj, the imperative use java. Now you can compile to .class and use either paradigm!
I don't code lisp regularly, but I'm convinced clojure is the NBT and so I'm preparing to jump ship after it matures :D