Defending Scala’s honour – why you should give it a go
After last week’s slight furore over the benefits of Scala and its community, John Stevenson tells us why he uses the language.
How do you know when a language is for you? It
usually is not something you can decide in 5
The Scala language has grown in popularity over the last few years and inevitably you have the followers and deriders publishing their opinions. Why not spend an hour or two and create something in Scala, gaining insight as to how the language works and forming your own opinion?
Scala is really easy to start with, especially if you are from a Java background. Their language is supported in IDE’s (Netbeans, Eclipse, IntelliJ, Emacs, etc) and with the typical Java build tools. You are creating byte code after all!
There are great tools such as Simple Build Tool (SBT) and the built-in run-time environment (the REPL) which give you that fast feedback loop that is invaluable when you are learning something new. This fast feedback loop is something I greatly miss when its not there.
If you want to see if Scala has value for your company, get some people together at work and see what you can learn over a few lunchtimes. In a few sessions you will be surprised what you can find out about the language and have a real basis to decide if you want to know more. Many people have started with Scala to enhance their testing approach, or tackling a problem that is challenging to do in their current language. There is also a lot of interest in Scala with web frameworks such as Play.
If you want to understand who else is using Scala and the benefits they have gained, attending a Scala community event gives you opportunity to learn from the experience of others. There’s a highly active community around Scala across the world, so you should be able to find a Scala or functional programming group near you. If not, why not create one yourself? Being in a group is a fun and effective way to learn, running a group is a useful aspect to talk about when developing your career.
Some Scala and functional programming grous in the UK include:
London Scala user group Functional Brighton Dublin Scala user group London Clojurians
I play a small part in the London Scala community and have been amazed at the huge uptake in interest over the last two years and we now have around 500 members. Each month we organise talks and run coding workshops to giving anyone an opportunity to understand the benefits and challenges when using the Scala language.
Learning something new always helps challenge assumptions that we let ourselves make, so its good to try something new so we don’t become inflexible in our thinking.
Once I started looking at Scala it helped me add a different dimension to the way I was thinking about my Java code and the overall design. I am much more expressive when coding and take that extra time to think about the consequences, especially when it comes to state management. Whether I am using Scala or Java as my language, I am having a lot more fun and writing better code.
Should you learn Scala ? – that decision should be up to you. Don’t be swayed by other people and miss out on learning something new. Whether or not you use Scala, it should be your choice and you should know why.
Why learn any language?
As commented on by Uncle Bob and others, there is no “final” language that suits all and I hope there never will – it may signal the end of innovation and stagnation in an important part of our industry.