Weighing in on programming language investment options for 2010

In the classic text The Pragmatic Programmer: From Journeyman to Master Andrew Hunt and David Thomas make a very convincing case for practicing software developers to pick up a new programming language each year as a part of a deliberate knowledge investment plan. The software industry can be a pretty fast-moving place sometimes, and keeping on top of (or even ahead of) the latest trends can be a pretty smart thing career-wise, particularly so in a recession. Also, new languages broadens ones horizons, and analogous with picking up new natural languages can further proficiency in ones mother tongue (bread-and-butter programming language).

The language of 2009 was Groovy for me. As a (primarily) Java developer you simply gotta love the groovy! I would like to describe the language as a super charged version of Java that shares most of Java syntax, but requires far less boiler plate code, supports dynamic typing and the closures Sun successfully has been able to keep out of the Java programming language up til now¹. Groovy is extremely interoperable with Java: groovy source code compiles to Java bytecode and calling Java code from Groovy or vice verse is trivial. The Groovy take on the famous Ruby-On-Rails web application framework, Grails, is an impressive invention even if it has its problems.

The Programmatic Programmer argues that one should, just in conventional investing, diversify ones portfolio. For 2010 I’m ready to take on a language that shares far fewer traits with my current personal, as well and most of the industry’s, primary bread-and-butter language Java than Groovy does. Maybe even a  functional programming language. I decided on short listing Scala, Erlang and Clojure.

The short list

Scala appears to enjoy tremendous momentum for the moment. If Groovy is Java on steroids, Scala is Java 2.0. Founder of the Groovy programming language James Strachan has openly stated that if Scala had been around in 2003, Groovy would probably never has seen the light of day. Scala supports a mixed imperative/functional programming model and is a statically typed language with an advanced type system. Scala compiles to JVM bytecode and is Java interoperable on the same level as Groovy. Unfortunately Scala appears be be a quite complex language – the “authoritative tutorial” on the language, Programming in Scala by language founder Martin Odersky, contains more than 750 pages.

Erlang is a  functional language with its origin within the telecommunication industry. Erlang has a strong focus on efficient concurrent execution and fault tolerance. Erlang is of Swedish origin, fully functional and has a syntax very different compared to C syntax language. On the down side, Java interoperability is very weak as Erlang compiles to a none-JVM bytecode. Also, Erlang momentum appears to currently be rather diminutive.

Clojure is a LISP and thus both homoiconic and very functional in nature. The syntax is completely dissimilar to C languages, being much smaller and relying on liberal usage of lots and lots of nice parentheses. Clojure is fully JVM-interoperable and appears to have some traction within the developer community, perhaps not on the level of Scala but there’s definitely some momentum out there.

What investment option did you go with for this year?

¹) Late 2009, Sun finally – obviously much overdue – announced that we can expect closures to be included in Java 1.7 after all.

10 thoughts on “Weighing in on programming language investment options for 2010

  1. I’ve started exploring Clojure this year, one reason is because it’s a JVM language and my background is not Java. ( blatant self-promotion: http://metaljoe.wordpress.com/2010/01/10/why-im-learning-clojure/ )

    I can certainly recommend Clojure, especially if you’ve not done any LISP programming. However I note that you are a Java programmer, in which case I would seriously recommend giving Erlang a look. Its Prolog-inspired syntax and the fact it doesn’t sit in the Java ecosystem will be very educational and encourage use of different approaches to coding.

    • Yep, I’m primarily java these days. But I do have some LISP exposure from college (the introductory programming course and the AI course were all LISP).

      I’m leaning heavily towards Clojure for 2010! 🙂

  2. I’ve taught myself Erlang and Scala in that particular order and I’ve learned tremendously from both. The Erlang book (Programming Erlang by Joe Armstrong) is not too long and easy to pick up. It is worth learning Erlang just if you want to understand the way it deals with concurrent programming (with the Actor model) and the way it deals with fault-tolerant software (using the OTP stack). I find those two things very interesting.

    Moving on to Scala, I really like it. Some features are complex (and Programming in Scala by Oderski et Al is a thick book), but the more you use the language, the more familiar you become with it. The basic features are quite easy to understand and enough to allow you to write simple scripts or programs quite easily. It certainly is very extensible in a way that Java is not as well as being very concise like Groovy. Since you know Groovy, learning the functional aspects of Scala should not be too complicated.

    Learning a language is an investment, and you eventually want to benefit from it; I don’t know where you are based, but in the UK, I am seeing more jobs advertised for Scala than for Erlang. I know of very few people using Clojure in a commercial context, but I am sure this will change in the future. Clojure looks interesting let alone for the way it handles concurrency. I will be learning that next.

  3. I am partial to Erlang, since I’ve been developing full time in it for the past two years. That being said, here’s my analysis. Take it with an appropriate grain of salt:
    – ease of learning: Scala, since it’s closest to Java and Groovy. Plus you won’t need to change environments.
    – job opportunities: Scala seems to have more. Erlang has some, Clojure almost none at all.
    – new concepts to learn: Erlang. It will simply open your mind up to a new and, some would say, better way of doing things. Almost nothing is similar to what you know.
    – practicality for real life projects: it’s a toss up… Scala has access to the massive library collection created for the JVM. Same with Clojure, if I’m not mistaken. Erlang’s library set (known as OTP) is decent, but not at the same scale. On the other hand, Erlang/OTP is geared towards the practical aspects of writing, deploying and maintaining highly reliable and scalable servers and that will make your life much easier in the real world.

  4. I’ve picked up all three of these (to varying degrees) in the last year and I’d say they are all worth your attention. I found Erlang and Joe Armstrong’s book to be really easy to pick up and a great introduction to FP and concurrency.

    Everyone should learn a LISP at some point and Clojure has the added bonus of running on the JVM and thus being portable and having access to all the standard Java libs.

    I found Scala to be the most difficult to learn. The core is actually quite small, but due to the flexibility of representation and abstraction, there is a large perceived surface area to the language. Many interesting ideas in the FP/OO hybrid.

    I’d also throw F# into this list as having many of the same attributes: FP, strong concurrency, great VM.

  5. Unfortunately, the special-case garbage Mark Reinhold is proposing for Java 7 is not even close to closures. He wants to perpetuate the same old outer-scope-variables-must-be-final crap that makes Java so non- (or perhaps dys) functional today.

    The best reason to learn another language today is to put Java behind you. It jumped the shark with generics and just keeps not getting it.

  6. Pingback: Top Clojure Links « Slackhacker

  7. Are you limiting yourself to JVM based languages? C# has added new features more rapidly than Java has.

    How about Haskell? It looks terse (first impression) but wondering how does it compare to Erlang or Scala if the goal is to learn functional programming. I have heard good things from some folks with Haskell background but chose Scala mainly to leverage the Java/JVM platform.

    I guess it would be a good investment these days to be a polyglot programmer knowing one mainstream language well (like Java or C#) and a couple for very specialized tasks.

    I do believe in the idea that learning a new language will make you a better programmer in your current language so it may be worthwhile just for that reason. You goals should be clear about why to learn a new language and make sure you are not just rushing to the new shiny thing.

    I have played around with Scala and Groovy and planning to learn Clojure – substitute for learning Lisp as Alex commented that one should learn Lisp at some point and want to discover that for myself!

  8. Dear all,

    I am still with perl. There are many modules for parallel processing in perl. However, scala is much cleaner than perl. Since, I don’t like java, I guess my combo will be:
    perl + Haskell for all tasks imaginable.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s