What to expect from Scala in the real world

There was recently a study about Scala vs. Java where some of Scala's productivity, conciseness, and multi-core abilities were put to the test.

The basic idea is take some semi-experienced programmers, teach them Scala for 4 weeks and see how they do coding up a contrived week-long multi-core example.

The results basically did not support Scala's claims of being radically better than Java.

This is the real world, folks

A fair number of pro-Scala people have commented that it's not really fair to give a developer 4 weeks of training on a new language that has a ton of new paradigms and expect the developer to be proficient.

Except, that's the way it is in the real world. An organization that adopts Scala is likely to give their developers far less than 4 weeks of training on Scala before the developers embark on a new project. So, as a real-world thing, the study demonstrates what you can expect a month or two into a Scala project.

The study is in fact fair because in the real world, we don't have the luxury of letting developers take 2 years to explore a new language before measuring how well they will do with the new language.

It took me years to become excellent with Scala

I'm one of the most prolific Scala coders around (I wrote a lot of Lift as well as Beginning Scala). It took me until I was done writing a book on Scala before I felt really comfortable with Scala. I had the luxury of spending a lot of time with the language, but that's not the normal case.

Looking at the long term

Yes, someone who invests 2+ years in Scala and who is generally good to excellent with coding will be a more productive in Scala than in Java. I've seen a number of projects where Scala has made the difference in terms of (1) raw developer productivity and (2) ability to recruit top-notch talent. The combination of the two facts has led to results that I do not think could have been achieved with Java.

On the other hand, a company adopting Scala for a project without making the long term commitment to training and developer growth will likely see the same kinds of results demonstrated by this study.

Java 8

And then there's Java 8. With closures in Java 8 (no, they are not as good or flexible and Scala's), the gap between Java and Scala gets closed significantly. It will become much easier to build libraries that have a lot of ARM (automatic resource management) stuff built in. It will be easier to deal with collections with Java 8 and closures.

Am I slamming Scala?

No, I'm not slamming Scala. I'm giving my view of Scala through a real-world lens.

I love Scala. I wrote Telegram in Scala and really grooved on the excellence that Lift and Scala bring to the table.

But having a study that reflects the way Scala will do in the real world is super-important. Advocating for Scala means helping people understand the expected outcomes of Scala project, rather than the best case, pie-in-the-sky outcome. This study sheds valuable light on likely outcomes of a first or second Scala project in a company. There are other examples (like Foursquare and OpenStudy) that demonstrate just how amazing a small, excellent team can be with Lift and Scala.