Real World Scala Test

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.

Don’t forget to share!

Reference: Standalone Puppet with Capistrano from our JCG partner David Pollak at the Good Stuff blog.

Related Whitepaper:

Java Essential Training

Author David Gassner explores Java SE (Standard Edition), the language used to build mobile apps for Android devices, enterprise server applications, and more!

The course demonstrates how to install both Java and the Eclipse IDE and dives into the particulars of programming. The course also explains the fundamentals of Java, from creating simple variables, assigning values, and declaring methods to working with strings, arrays, and subclasses; reading and writing to text files; and implementing object oriented programming concepts. Exercise files are included with the course.

Get it Now!  

Leave a Reply


4 × = four



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

15,153 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books