A Business Case for New Languages

The Benefits of Adopting Scala over Java

by Dianne Marsh
April 15, 2011

Unsure about when to adopt a new technology? Do you think your old technology is "safer"? Maybe ... or perhaps sticking with it offers risks of its own. This article discusses some of the benefits of adopting Scala rather than staying with Java.

At SRT Solutions, we promote the use of new technologies and languages with many of our customers. One question that business decision makers often ask is, "Why should my developers learn and use a new technology? We have a language that works. They all know it, and we're delivering on that platform. Why waste time and money having them learn a new language?"

It's true. You do have a language that works, one that you know and are comfortable with. Why not keep using it?

Let's make some analogies with automotive manufacturing. I am from Michigan, after all!

Java was first introduced over fifteen years ago. Many applications are still built using these languages. They're shiny, new applications. But they are held back by decades-old decisions. The styling is a bit outdated, as is the way that you interact with them.

Automotive manufacturers could choose to build cars using decades-old engines and transmissions, cigarette lighters and other things that seemed important in the past. But, much like your software program, the car would be shiny and new, but with 90's styling and (worse yet) bad fuel efficiencies. To follow our analogy a bit further, we would also restrict them to the tools that they could buy in the 90's, allowing for updates only where the new tools would also work on the old systems.

The automotive manufacturers don't build cars like that, and we shouldn't build software with decades-old programming languages either. Innovations that didn't worry about backward compatibility have given us hybrids as well as electric-only cars. We're seeing fuel efficiencies that were claimed impossible ten years ago. And manufacturers are using tools for building cars that allow them to get the cars to market faster, and less expensively than they could in the past.

That same magnitude of innovation is available in software. By choosing a modern programming language, like Scala, your developers can deliver your application sooner and at less cost. Concise languages like Scala allow programmers to focus on the core logic, leaving out the boilerplate. Less code makes the intent of the programmer more obvious, and the resulting code is easier to understand. Clearer, cleaner code is easier to debug, and makes it easier to avoid errors in the first place.

Combining Scala with modern testing tools, like ScalaTest, provides more clarity around what the program does, reducing the likelihood for discovering problems in production. The language runs on a familiar platform (the Java Virtual Machine), much like the cars of today run on our highway system.

If you're worried about your existing investment in Java, don't. Scala and Java can co-exist. You can call your existing Java libraries from Scala, and the new Scala that you write can call the new code that you're going to write in Scala.

But wait, what about Java 7? Yes, Java 7 is due to release this year. But Scala already provides most of what will be provided in Java 7 along with many other enhancements. There's no reason to wait. Choose Scala now, and view Java 7 as a maintenance release for code already written.

Another concern, often raised by the business folks, is about the development team and their ability to learn a new language. If you have a self-motivated team, they're probably already excited about learning a new language. And, while they're transitioning, they will be able to write Java-like code using Scala. So, let's move on and write new code in Scala and reap the benefits of writing less code and delivering more software.


Scala can be found at:

ScalaTest can be found at:

SRT Solutions can be found at:

Talk back!

Have an opinion? Readers have already posted 26 comments about this article. Why not add yours?

About the author