These days I get bored with Java. Don’t get me wrong, Java is a nice language. After all I couldn’t do Java programming as a living if I didn’t like it, trust me ;).

But I need something new, a new way of viewing problems. And also a new way of solving them.

Functional programming is trendy nowadays, but I think it’s here to last. And it already did since it’s not that new, far from that. So I thought it would be nice to learn some new languages :

  • Scala, because it can leverages my current Java experience and at the same time expanding it with a mix of functional style. Moreover it is currently gaining more and more popularity.
  • LISP, well Common Lisp, a language I’ve always been attracted to - and scared of at the same time. I am currently reading the excellent “Land of Lisp” book.
  • Clojure, because it’s a LISP-dialect that can be run onto the JVM. It can also be translated to JavaScript, but that’s a bonus, not a requirement.

Why these languages ?

Well, I’ve already told you up here why. But I’m going to go deeper in the why’s of these choices.

In my mind these three languages are clearly related by a common subject : functional programming.

Scala

Scala is gaining a huge momentum these days. Many of greatest figures of the Java world, including James Gosling, Doug Lea, Rod Johnson, not to mention many other brilliant minds, are making the transition from Java to Scala. They have joined Typesafe, the company co-founded by Martin Odersky - the creator of Scala - and Jonas Bonér - the creator of Akka. The company recently raised funding and is pushing Scala to mainstream, which I think, it is doing well.

The main advantage of Scala are well-known.

  • Multi-paradigm : you can write your programs in a mix of OO and functional style;
  • Ecosystem : you can leverage the use of thousands of Java libraries and frameworks. You don’t have to start all over again with new ones.
  • Concise : even if it proposes multi-paradigm programming style, it enforces and pushes you to use a functional one. This can make programs shorter if used carefully.

Of course there are cons :

  • It’s a new language, constantly evolving. The creators don’t hesitate to break the compatibility between major versions. It’s a major issue for programs maintainers, but I think it’s a necessary evil in order for the language to evolve in the right direction and to leave the bad decisions behind.
  • It has a learning curve, sure it has, like all the tools you have to use. I don’t mind learning new language, new libraries, new frameworks, new tools. In fact I hate stagnating.
  • It can result in less readable code. Just like in all languages, you can do awful things. A programmer has to be careful, he has to do some tradeoff. Readability is, in my opinion, one of the most important characteristic a program should have.

LISP

I often read here and there that even if you never program in LISP for a real project you’ll learn a way of thinking that will make you a better programmer, whatever the language you actually use. So I was intrigued by this statement and I would like to see if it’s true. Moreover since Scala promote functional programming as the paradigm of choice when writing programs, I thought it would be mandatory to try to really grasp the whole concept. I could have chosen Haskell instead but since I really wanted to leverage the JVM ecosystem I thought it was wiser to learn LISP since Clojure borrows most of the concept from it.

That’s why I’ve recently purchased Land of Lisp. I currently read it and I must say that this is a very well written book. I’m not that far into it - about page 100 - but it’s very interesting and the tone of the book really fits me :).

Clojure

What can I say, as aforementioned it’s LISP on the JVM :)

The final word

Maybe I won’t use these technologies at work - that is especially true for Clojure and LISP - but I think they will translate to a shift in my way of working, of reasoning about problems and their solutions. That’s exactly what I want to do : to bend my mind, to make it work differently, to see things in a new perspective.

Just for fun.