Making a case against Scala is David R. MacIver blog post entitled 'Why not scala':
I'm just going to focus on language (and implementation) issues.
You're looking for a functional language
Scala is not a functional programming language. It has pretensions of being so, and it has adequate support for functional programming, but it only goes so far. It's got better support for functional programming than C#, Ruby, etc. but if you compare its functional aspects to ML, Haskell, OCaml, etc. you'll find it sadly lacking. Problems include:
* Its pattern matching is really rather cumbersome.
* An annoying distinction between methods and functions. Scala's first class functions are really no more than a small amount of syntactic sugar around its objects. Because Scala's scoping is sane this isn't particularly an issue, but it occasionally shows up.
* The handling of multiple arguments is annoying. It doesn't have the pleasant feature of Haskell or ML that every function has a single argument (multiple arguments are encoded as either tuples or via currying). Admittedly this isn't a prerequisite of a functional language - e.g. Scheme doesn't do it - but it's a very big deal in terms of typing and adds a nice consistency to the language. I'm not aware of any statically typed functional languages which *don't* do this (although the emphasis between tupling and currying varies from language to language).
* Almost no tail call elimination worth mentioning. A very small subset of tail calls (basically self tail calls - the ones you can obviously turn into loops) are eliminated. This is more the JVM's fault than Scala's, but Martin Odersky himself has shown that you can do better (although admittedly it comes with a performance hit).
* The type inference is embarrassingly weak. e.g. recursive methods won't have their return type inferred. Even what type inference is there is less than reliable.
Read David's post:
While on the other hand, you can find a case for using Scala
by Ravi Mohan in 'Sliding into Scala':
I've been dissatisfied with java for a while now, but to give the devil his due, it does hit a sweet spot. When you are looking for a combination of cross platform, fast, statically typed, easily deployable language with tonnes of libraries, there isn't much else available. But on the other hand the language itself is mind numbingly verbose and since most of my coding these days is in a combination of scheme and C, when I do switch back to java, it is as if I am suddenly running through quicksand, eclipse notwithstanding.
Enter Scala. I looked at Scala a year ago, tried some sample scripts, stumbled across a bug and gave up. But things have changed since then. I've been experimenting with Scala over the last few days and I am tremendously impressed. Besides writing small scripts to explore various language features, I've been rummaging through the code for the compiler and type checker (written in Scala of course). Martin Odersky has something that is all too rare in the software world today - a strong sense of design (I am looking at you, Ruby On Rails).Scala has too many brilliant features to go into any great detail here, (there are plenty of blogs that do go into detail see this or this for e.g) but in essence code compresses to almost nothing, the type system is brilliant, and pattern matching is something I've wanted in a jvm language for a long time. One can even do monadic programming in Scala! I am VERY impressed.
Now don't get me wrong, there are a few rough edges. For example one of the things it doesn't have (as of this moment) is a good reflection API. I tried to write a xunit clone to get my feet wet and got stuck on identifying all the methods that start with "test", for example. (It *can* be done by leveraging the underlying Java but not from native Scala). The build system is a mess (try building from source and watch the build fail for lack of heap space - this is unforgivable in 2008) and there is less of a focus on testing/regression than I'd like. And oh, if you are using the interpreter make sure you use jline ("sbaz jline" should do it- I don't know why this isn't part of the standard distribution).
But these are minor quibbles - Scala is a brilliant accomplishment. I think Sun should just declare Scala to be Java 8 and be done with it.
Read Ravi's complete post: