A contrarian perspective on Scala
Tuesday, December 25, 2007 at 7:34PM As you will notice if you read through my last few posts, I've been exploring Scala, a relatively new programming language that combines most of the nice features of languages like Ruby and ML, with the ease of deployment of Java.
I've been evaluating it with respect to a new project I've been pondering, and have concluded that its not ready yet. There are two key reasons.
The first is that the implementation of Scala's standard libraries is still unstable. Within days of first discovering Scala, I'd found my first bug, a rather fundamental flaw in Scala's JSON parser. This suggests to me that Scala's standard API lacks even basic unit testing (this despite the existence of a variety of seemingly powerful testing technologies, such as Specs). I filed a bug for this problem here.
Its hard to justify basing a project on a language where the standard libraries cannot be relied upon to work. I'm afraid that Scala really need to establish some better quality control for the code that makes it into the standard library.
Secondly, the tool support isn't there. This may seem like an unfair criticism, but I strongly suspect that most potential Scala users are Java refugees, and said refugees are accustomed to powerful IDEs like Eclipse, with features like code completion. You get addicted to features like this, and regardless of its merits, a language that requires you to forego them is starting with a big negative.
Scala has two Eclipse plugins, a more stable one without proper code completion (which crashes on me about once a day), and a less stable beta plugin with code completion, which crashes more often. This beta is more promising, but development seems to have stalled since its last release a few months ago, and the developer is working hard to lower people's expectations. The bottom line is that neither is production quality, and they will waste your time with mis-reported errors and regular crashes.
Scala has incredible potential, it is the natural migration path for those frustrated with Java's verbosity and inflexibility, but its not ready for mainstream usage yet. Anyone that opts to use it for a large project today is thinking with their heart, not their head, and is jeopardizing their project.
Scala 

Reader Comments (11)
Hi Ian,
I pretty much agree with what you write, Scala is not ready for mainstream yet. But maybe you have said the same things about Java 1.2 ;-)
It's nice that you noticed specs, but this is also a quite recent project, which grew from my discovery that Scala had powerful features but could have a better specification/testing framework than the embedded sunit.
specs also integrates scalacheck (http://code.google.com/p/scalacheck) and I hope that both will now start being the foundation of extensive test suites for the Scala community.
I also think that having a bullet-proof IDE is a decisive step for mainstream adoption. Jetbrains has decided to invest on Groovy rather than Scala, which is unfortunate. Developing a good Scala plugin is certainly too much for a single developer and unless a company or an open-source project backs it up, I'm afraid progresses will be very slow.
Anyway, feel free to ask any specs questions if you experiment that library!
Eric.
Hi Eric,
Thanks for the comment. Specs is very interesting, I have played with it, and also looked at scalacheck, which is also very interesting. I really can't wait until Scala is mature enough for me to use it in a serious project, and I hope to continue to play with it (and file bugs) until it is :-)
I am feeling a bit contrary too. I think that your reliance on Eclipse clearly says to me that you are not a refugee. But a more mainstream programmer who is not willing to go out on a limb. Eclipse is the bread and butter of the VB programmers who are now what forms the main body of enterprise java programmers.
Eclipse is nice but should not force your choice on the reliability of your language. Scala works pretty well with vim or emacs. :)
As for the testing you are correct though. I will have to check out the tool you mentioned. Good post !
tonetheman, I'm not, nor have I ever been a VB programmer. Unless you work for Sun, I can guarantee that I've been using Java for at least as long as you have.
Questioning the skill or experience of people just because they use Eclipse is exactly the wrong attitude if your goal is to evangelize Scala, rather it will have the opposite effect. I don't rely on rich IDEs like Eclipse, I just find that they make me more productive, and I'm in the majority of Java programmers, both experienced and less-so.
That JSON bug is fixed in 2.6.1; I filed #136 for it a little while back. My thought was that it's too bad no one had used the parser enough to find such an easy bug; there are probably others where it came from. Ideally things wouldn't get into the distribution that haven't been put through the paces, but time constraints and the overhead of branching for such a small piece of code get in the way. You're wise to have checked first in the interpreter before building a project around that, or any other back alley of the Scala libs.
Wait a minute. As a Java programmer, you've certainly run into plenty of bugs with Java's stdlib. Have you used java.util.Calendar? It's so bad that many Java projects (including my last one at Google) have switched to Joda.
As for tool support, it'll improve as more people use Scala. Just in the past few weeks, a new NetBeans plugin was released and the author is rocking it out.
I don't have any fear of using Scala in a production environment. In fact, I just accepted a contract job that plans to do just that.
stevej, believe it or not, in 10 years of Java programming, I have never knowingly run into an actual bug in java's stdlib. I know they exist, but I've never encountered one personally. Perhaps its because I've never needed to use java.uitl.Calendar for anything too complicated.
Contrast this with finding a bug in Scala's stdlib within days of first discovering the language, while doing nothing terribly ambitious.
I agree with you on tool support improving, I know that all of these issues should be addressed with time, but the purpose of my blog entry was to discuss where Scala is *today*.
For selfish reasons I'm glad you are using Scala in a production environment, because it means you will find and report bugs so that I won't have to - but Scala is not yet at the point where I'm willing to bet a project on it.
gucci bags
sells Designer Handbags and has a pretty good selection. I have not seen the quality of the merchandise myself but I know that they are legit.
A sail veering about the blank bay waiting for a swollen designer sunglasses wholesale bundle to bob up, roll over to the sun a puffy replica sunglasses wholesale face, salt white. Here I am. They followed the winding path down to the creek. Buck Mulligan stood on a stone, in shirtsleeves, his wholesale cheap sunglasses unclipped tie rippling over his shoulder. A young man clinging to a spur of rock near him moved slowly frogwise his green sunglass wholesale legs in the deep jelly of the water. Buck Mulligan sat down to unlace his wholesale oakley sunglasses boots. An elderly man shot up near the spur of rock a blowing red sunglasses for wholesale face. He scrambled up by the stones, water glistening on his fashion sunglasses wholesale pate and on its garland of grey hair, water rilling over his chest and paunch and spilling jets out of his wholesale sunglasses china black sagging loincloth.
The Eclipse is nice but should not force your choice on the reliability of your language. Scala works pretty well with vim or with the emacs.
best online roulette
I have played with it, and also looked at the scalacheck, which is also very interesting. I really can't wait until Scala is mature enough for me to use it in a serious project.
Regards:
canon powershot a480