Feature:
Addressing the Scala FUD
By Craig Tataryn
TheServerSide.com
There has been a great deal of buzz about Scala in the last year or so, and as we all know, buzz
is always followed closely by the buzz-killers. Recently there have indeed been quite a few criticismsm of the language,
including complaints ranging from wimpers about how “IDE support simply isn’t there” to
cries from others that “the language is hard to understand and maintain”.
Perhaps the Scala nay-sayers should take the advice Neal Ford had to offer in a recent
podcast on the topic of language reachability where he states “In what profession in
the world is ‘it is too hard’ a valid reason not to do it... true professionals learn
to do hard things”
When it comes right down to it, there seems to be some common thinking and fallacies found amongst
those who disparage the Scala language:
Scala and the Matrix
The biggest problem with those who criticize Scala is that they often only give the language a cursory glance without spending the time to learn the fundamentals. These are typically the same people who spread FUD about the poor reachability and difficult maintainability of Scala.
I always think of this as I did when I first watched the movie “The Matrix” and thought to myself “there is no way the operators can make sense of the green hieroglyphics streaming down the screen”. I think this way because there is no “operator back story” which explains how the Matrix stream is structured, and how long they practiced to figure out its semantics.
Now I’m sure the next DZone link I’ll see is “Scala enthusiast likens Scala’s complexity to that of the Matrix”, but that’s not quite the point I’m trying to make here. Here's what I'm saying: learn the fundamentals before you start seriously coding in Scala. This can be achieved by picking up a copy of O’Reilly’s “Programming Scala” which can actually be obtained for free. Or even pick up The Scala Book of Reference which is Odersky’s Programming in Scala 2nd Edition. Using a combination of these two books, combined with the interactive Scala shell, which comes standard with the Scala distribution if you just type in 'scala' at the command-line, will curb your initial frustration with the language while helping you understand its power. Find out how refreshing it is to come into a language which supports an interactive shell. Not having to create "test projects" just to prove a simple concept to yourself really goes a long way towards curbing frustrations.
Enterprise Scala?
Others complain that Scala isn’t being used on large projects in the real-world.
I guess this could be a valid point. I might argue that even if Scala isn’t being used on any
large projects,it is being used to tackle large problems. Take Twitter for
example, the quintessential example of an application which needs to scale due to large volumes of
concurrent updates. The people at Twitter use Scala, and
they claim great benefits are reaped from the static typing, great threading support and the decade
of optimizations which have occurred in the JVM.
Scala IDE Support
And of course, we always hear complaints about how Scala IDE support simply isn't up to par.
A year ago I would have agreed with this. Now though, the IntelliJ IDEA Scala plugin, which you can get for free with the Community Edition, is actively being developed, and is affording the Scala programmer the same conveniences to which the Java developer has grown accustomed. I’ve also heard good things about the Netbeans IDE, and Eclipse’s Scala Plugin is now being developed by none other than Odersky himself; it sounds like there's a real bright future in terms of Scala IDE support.
Defending Scala's Honour
So, what has driven this rant in defense of Scala and its honour? Well, it's just kind of sprung out of my preparations for my Scala session at TheServerSide Java Symposium on March 16th of this year in Las Vegas.
What I’m hoping to achieve in my session at TSSJS 2011 Vegas is to present a solid overview of the Scala language, while demonstrating language features and concepts that might be alien to a Java developer. When people attend this session at TSSJS, they're going to start muttering to themselves: “Really? You can do that? I so wish Java could do that!” My talk will serve as a starting point in a journey of learning the fundamentals of the language, which in my opinion is a very important step to take before you jump head first into a pool of Scala code.
Sticking it to Wicket
I should also mention that I will shoe-horn in a nice overview of the Apache Wicket web framework at the upcoming conference.
Why? Because I think, like Scala, it's another powerful tool which is misunderstood as far as
its complexity and reachability. The enterprise is largely ignoring Wicket, and I think
that’s to the detriment of web application developer productivity and creativity; but sadly, I
don't have the time to write another article about that. To find out why the world would be a
better place if you were developing with Wicket, you'll just have to attend my
talk.
Follow Cameron McKenzie on Twitter (@potemcam)
Recommended Titles
Josh
Suereth's Scala
in Depth on Amazon.com
Martin
Odersky Programming
in Scala
Cay
S. Horstmann's Scala
for the Impatient
Martijn
Verburg's The Well-Grounded Java
Developer
02 Mar 2011