What is Clojure bad at

The German Python forum

Post Sat Jan 08, 2011 11:03 am

Nice report. I share the view that Scala is nice, but also somehow complicated. When Scala was new, I had experimented a bit with it and it was painful to find the right syntax and to guess what was wrong from the partly cryptic error messages of the compiler. That is now better and I was told that the Scala Support from Intellij IDEA is currently the best of the three big IDEs, but even this does not yet master what I take for granted with Java: A syntax check directly at the Input. What finally frightened me was my failed attempt to understand the class hierarchy of the new collections. It's so incredibly complicated that I wonder if it was worth the result.

Clojure is much easier there and I played with it when it was new. I actually thought I had left Emacs behind with my studies and so I tormented myself longer with getting an Emacs to work with Slime and Clojure on the Mac and struggled longer with the archaic keyboard shortcuts than I really did with Clojure could program. While I actually find the extension of Lisp - () - syntax to [] and {} quite good, the use of "#" for "we have even more syntax", especially for sets and functions, bothered me.

And Clojure (version 1.0 and 1.1) definitely generates worse error messages than Scala and real IDEs were (or are) still in short supply. Can I now debug single-step through a Clojure program?

The Clojure (like most Java applications) takes a relatively long time to start compared to Python, I don't think that's so bad. For me, `time java -jar clojure.jar -e" (+ 3 4) "says 1.2 seconds. To experiment a bit, I'll start the REPL once. The interpreter only starts once together with Slime.

My main problem with Clojure, however, is that I don't know what to use it for STM for Concurrency is a promising idea, but I don't think that writing server systems in Clojure instead of traditionally in Java is not a majority. And in Java I can do something similar with an appropriate library and some discipline that I check with PMD and Checkstyle and so on. AFAIK, the STM library can now also be used in JRuby. Of course it helps to have a language that has immutable variables by default, but as chic as I find Lisp, the value for me is more in broadening my horizon than in having found a tool that I can use to duplicate my next project can realize so quickly.