Thursday, July 09, 2009

James Strachan: Scala is the new Java

I've been hearing about Scala for a while now, and have been contemplating digging into it a bit, trying to write some code and get an idea of its strengths and weaknesses.

I think James Strachan's blog post just put me over the edge.  I'm not sure when I'll find the time, but learning Scala has just moved high up on my "things to do to expand my knowledge" list.

What particularly kicked me into high gear was that James is the author of Groovy, from all I've heard an excellent language in its own right.  In his post he says I can honestly say if someone had shown me the Programming in Scala book by by Martin Odersky, Lex Spoon & Bill Venners back in 2003 I'd probably have never created Groovy.

Wow.  That's some statement.

James' salient points:

  • Scala has type inference - and that's a good thing: "it makes code comprehension, navigation & documentation much simpler"
  • Scala has high order functions and closures "so you can write beautifully concise code"
  • Scala has mixins (called "traits") "so you don't have to muck about with AOP wackiness to get nice modular code"
James summarizes "the beauty of Scala soon becomes apparent; its simplified so many of the gremlins in the Java language, allows you to write very concise code describing the intent behind the code rather than the implementation cruft - together with providing a nice migration path to elegant functional programming which is awesome for building concurrent or distributed software"

Time to get Odersky's book and give it a spin. 

No comments: