Monday, July 6, 2009

James Strachan's Blog: Scala as the long term replacement for java/javac?

James Strachan's Blog: Scala as the long term replacement for java/javac?

This mirrors my thinking exactly! I'm really excited by Scala.

Back at university, I did a Functional Programming course, where we did some lisp programming. I loved it, but always felt like I was missing something. Even years of hacking my emacs to get it to do just what I wanted just made me feel like I wasn't getting it.

Now with scala, and the Programming Scala book, I really feel like I'm starting to get what Functional Programming is all about. Java/OO feels like second nature to me (some users and maintainers of my code might disagree!) but now, every programming task has a new dimension:

How would I approach this from a FP perspective?
Can I make the API more expressive, more concise, cleaner?

Sometimes I don't have the time to think through it and stick with the OO approach, but when I do the answer always seems to be "Yes". I feel this is due partly to FP and a lot to Scala.

I've spent time learning Ruby and Rails, Python and Groovy. There was a lot I could do in those languages that felt a lot easier and nicer to read than Java code. Groovy/Grails really sped things up for the presentation and model layer. Yet, for anything serious, I went back to Java. I missed the tool support, the automatic imports, class name completion, refactoring.

Scala doesn't have all the refactoring or automatic import support yet in it's IDE providers, but they're coming fast. And they'll be as good as Java's once they've arrived, which will never be true for dynamic languages.

I went to the Scala Lift Off after JavaONE and was inspired by the excitement in the community and the smart people it was attracting. I'm hoping to do more and more Scala programming in the future.