Time to dig into Scala

I’ve been putting it off for a while, but I think it’s time to get the Scala plugin for Eclipse installed and start to work through some tutorials to see what the buzz is about Scala. In particular I’m interested to see what approach the Lift framework takes for building webapps, and how this compares with the endless list of webapp frameworks we have in Java-land.

There’s been a lot of stirring recently regarding replacements for Java – the trouble is, so many enterprises have major investments in Java based systems at this point. Java (the language) will not go away any time soon. The change that’s about to happen is that I think alternatives to the Java language are on the cusp of being realistic alternatives for new development projects – Ruby, JRuby, Scala etc.

Programming languages are an interesting thing when it comes to making a choice which to use for a new project. For small projects with a small development team (<5 developers) the choice is less about finding resources who have experience in language XYZ, it’s more important to think about what resources you’ll have around in the future who have experience with obscure language XYZ which the 2 man developer team originally chose because they read some article about it and it sounded cool at the time.

For larger development efforts, if you’re staffing a 100 developer team it’s obviously more important initially to pick a language for which you can find 100 developers that have experience in that language. At this point, Java is obviously a natural choice since you can easily find plenty of Java developers in most metropolitan areas. I challenge you to find 100 Scala developers in any city who are available to start a new project next week. That’s going to be a tough challenge for your recruiting team.

I can remember around 1996 when Java first started to get attention as a ‘language for the Web’ that at the time it was an interesting curiosity but definitely not a language you’d pick to use on a new development project. It took a couple more years before it matured and started to see more use on the server-side rather than for web page front ends using Applets. At this point in time, Java has been called ‘the new COBOL’. You’ll face little or no resistance if you recommend a Java-based solution for a new web-based enterprise system (unless you’re already a Microsoft shop in which case you be using C# and .NET etc).

The interesting thing about Ruby and Scala is that as languages they’re both already been around for years. Scala takes an interesting approach in that it capitalizes on the years of investment developing and refining the JVM platform, and then takes a blend of OO features and syntax from Java and mixes in some Functional style programming. Whereas Java took the good parts of C++ and left out some of the not-so-good features, Scala seems to be going down the same path for the evolution of Java – takes some good features, leaves out not-so-good stuff (static properties, primitives, non-OO features), and then builds upon it, and adds Functional language features too.

I still think it’s too early for Scala to be recommended for a large scale development project (namely because of the lack of developers with Scala experience), but it will be interesting to see in the next few years whether it starts to make inroads and take over from Java.

2 Replies to “Time to dig into Scala”

  1. Depending on the job you have to offer, using a less common language can also be a plus. (See Capital Jane for instance, which solved their recruiting problems with OCaml.)

    But looking at Scala: migration (especially from Java) is really easy. It’s not like you have to teach people a whole new paradigm.
    You can sell it as a cruft-free Java and even the worst code of bad programmers will be better and more readable than the equivalent in Java.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.