The Scala debate demystified: Balancing the rants with the raves
By Jason Tee
What is it about Scala that creates such a chasm between ordinarily like-minded software developers? This ten year old programming language seems to bring out all of the fondest dreams and deepest frustrations of developers to the fore. Some love the language and look forward to using it in each new project, while others swear they will never touch it again. Even within a single organization, opinions can differ dramatically.
A scathing Scala review
Giles Alexander, a lead developer at ThoughtWorks, had his first run-in with Scala in 2007, leaving him less than impressed. After a second harrowing experience with the programming language in 2013, he let the entire programming community know how he felt through a blog post that went viral. Even after the firestorm created by his expression of an honest opinion, he stands by most points in his one-star-review. Among his list of complaints were concerns with the excessive compile time, inconsistent and constantly changing libraries, and poor documentation.
However, one of his more interesting criticism had to do with the highly academic origins of the language. Scala's great in theory and certainly provides a great deal of opportunity for experimentation, but the transition to a production environment is fraught with issues. There's a disconnect between how things work in an academic setting and how developers actually get things done. For example, the language with its flexible syntax seems graceful because it conceals as much as it reveals, but such flexibility can become unwieldily, and what once seemed graceful can quickly become clumsy.
Lost in translation
Alexander also points to other unexpected ways in which Scala can increase the workload for development teams. For example, it might be necessary to construct code simply to hide syntax, a sure sign that's something's wrong. Or, developers may be forced to figure out large, elaborate types in order to add type annotations to help the compiler figure out things it should be able to infer without help. "My thinking isn't being assisted. In fact, I'm having to tell the computer what's going on." And Alexander is right; such a necessity hardly seems progressive.
Smoother sailing with Scala
But wouldn't you know it, one of Giles Alexander's fellow developers at Thoughworks takes quite the opposite stance on the language. Jack Singleton, a senior software developer at ThoughtWorks, describes a much more gratifying experience with the Scala language. He says it's not about the language itself but the mind set of the people using it. "A lot of times, the decision of which language to use doesn't come down to what's best for the application. In reality, most applications aren't that different from one another. In my experience, it usually comes down to what type of culture you have, what kind of team you have, and how you like to develop software. I would recommend Scala to companies that are interested in the tools they are using and that enjoy working in tight-knit teams."
In Singleton's mind, Scala is the best fit for Java developers who can't stop thinking about a better way to do things. Instead of seeing Scala as an obstacle to getting the job done, they need to be excited about the challenge of learning a completely new way of thinking.
However, Jack does understand some of Alexander's frustrations, including Giles' concerns about the Scala libraries. Singleton has some gentle criticism for SBT, the largest and most popular Scala library. "It's still notorious for its use of symbols and deep dive into a functional way of expressing everything. When I'm working on a project for a client, trying to get functionality out the door, I don't want to have to dive into my build system and learn a whole new world and way of thinking just to get a task to run in my build. However, I think the guys behind SBT have learned that and are actively trying to improve it."
But Singleton is confident in the community's ability to focus on the readability and maintainability aspect of writing library code, rather than simply adding cool features. Perhaps when the language has been wrangled into a more standardized format, it will appeal to a broader set of developers.
Will Giles be convinced to give it another go a few years down the road? Time will tell. But one thing is for certain: beyond all the ranting and raving, Typesafe's Scala is a strong language that can take strong criticism. In fact, it's ten years of constructive commentary that has put the language in the enviable state that it currently finds itself: it is popular, it's scalable, it is proven, and its fan base continues to grow strong.
01 Mar 2014