| imo it depends largely on your co-workers / environment. For instance, where I work (bigco) there is no way a large number of OO-java programmers are going to switch to a functional language like clojure. However, there is a chance that OO-java programmers will switch to scala because the mental models can be similar enough when you're first getting started. That is, you technically can program java-like scala because you have objects, strong-types, assignable variables, etc. So while scala has powerful language features available, the barrier-to-entry is lower (for a "regular" OO-java guy). With clojure, on the other hand, if you haven't done "functional" programming at a large scale you literally have to relearn "how" to program. You don't have state, you can't assign variables, you only sort-of have objects, and there are all these funny parenthesis all over the place. So first ask yourself the question "who are you going to be programming with" and "what do you want to learn". I've written and deployed non-trivial production systems in both and I'm fond of saying that scala drove me to clojure. I'm not trying to start a flame-war or anything [1], so let's start with the good stuff: * you get functional constructs & concise iterators * ruby-like mixin functionality is awesome (implicits) - this allows you to architect using composition over inheritance which is a huge win over java imo. But... * the syntax of scala can get quite perlish at times (my favorite being the "crying-kissy-face-operator" :_* [2]). * the strong typing can be maddening. For instance, if you're trying to use two different JSON libraries (as in early days of Lift) you have to do all sorts of ugly type conversions. This leads to type boxing and... * For "nothingness" tests you have: Null, null, Nil, Nothing, None, and Unit. Fun. [3] * inline-xml (who asked for this?) It was when slogging through a Lift-based recommendation system that I discovered clojure and I have to say, I love clojure. You can program in a lisp but still use the gobs of java libraries available. The syntax is straightforward, the performance is good/acceptable, and because it's on the jvm you can use it in Hadoop etc. So while it does take longer for an OOP-minded person to think in more functional terms, I think you'll find that learning a lisp will make you a better OO programmer. * [1] I have tons of smart friends who love scala. I like scala better than java, but if I had my pick, I'd pick clojure over scala. YMMV * [2] http://www.mail-archive.com/liftweb@googlegroups.com/msg0822... * [3] http://blog.sanaulla.info/2009/07/12/nothingness/ |