Friday 20 April 2012

Learning Scala or, a Java Devs new love affair

My last contract has finished and I am waiting for the next one to start, this means I have got some free time, for the first time since my daughter was born just over 2 years ago.

What would you choose to do?

Me, I settled down to the top task on my really rather long list.

Learn Scala.

Having just spent every day for the last week completely immersed in Scala, I am only now coming up for air. So what can I say about it, is it worth it? Will it pay off? Will I still be using Scala in 5 years time?

In a word, YES.

Let me explain...

I learnt and started using functional programming about 5 years ago, using JavaScript. But while I loved the concise nature of the paradigm, it is rare to find a client who will embrace it. Their web designers tend to write small jQuery event handlers, and the backend developers like the object orientated stuff, but neither is willing to spend the time to grok something outside their comfort zone.

Scala is something else. It runs on the JVM, so my clients have already got the technology platform, it is interoperable with Java, ie: you can continue to use everything you already know, so they can maintain their investment, and finally it adds functional programming to Java, which makes development faster/better, so they get more for their money. All in all, a perfect solution.

The downside? You need to be willing to embrace a new way of thinking. Functional Programming is a massive jump from imperative or OO, and quite a large learning curve if you have never learnt it before.

Fortunately, you can make the change in small increments rather than the one large jump required for any other language, and you can keep working.

I already know this one is a keeper. So expect to see quite a bit more about it.

No comments:

Post a Comment