One of my new year revelations is to learn a new language (I'm investing in my knowledge portfolio) and I've decided to go with Scala. I was also looking at Erlang, but in the end Scala made the most sense to me because:
- It runs on the JVM. This is important to enterprise customers, and if Scala works out I'd like to be able to use it for our existing products.
- I am more comfortable with the language syntax, coming from a Java background.
- I can mix and match parts of our existing Spring based Java application with Scala bits. I'm actually interested in how far into component reuse utilizing Spring Dynamic Modules for OSGi I can get - swapping out Java backed components with ones written in Scala.
- I am interested in exploring Scala Closure and Actor idioms for revalidate (ETag helper for Spring & Hibernate applications), inspired by this post on using Scala for HTTP Precondition processing in Jersey.
- I'd like to explore the benefits in terms of code quality using Scala that Dave Pollack reports in building lift using Scala.
Ted Neward's introductory article on developerworks "The busy Java developer's guide to Scala: Functional programming for the object oriented" is easy to digest, and timely. After reading that, I followed the tutorials on the Scala site.
So far, the learning curve has been gentle. Type inference is cool. I find myself thinking about how I can apply the Scala way of doing things to problems areas in our product. I'm currently reading about "mixins", which allow you to treat classes as if they implemented an interface, even when they don't.
The next step is to install the Scala Eclipse plugin and start getting into more meaty examples (Updated a few hours later: see here for instructions on getting around the "org.eclipse.pde.runtime is missing" problem).