I liked the comments about immutability in the article, even from an OOP standpoint. After having read the "Eiffel" book 20 years ago, and being exposed to programming by contract and class invariants, the whole java-bean concept made me want to vomit. "Here's an object" -- too bad it's not good for anything yet, but eventually it will be! (good luck). Beans have to be almost the #1 anti-pattern in Java.
> Another language I don't see mentioned above is Fantom. Some say that already is a simpler language that offers improvements over Java without the overwhelming power of Scala, but it hasn't been widely adopted. There are many theories for this, my own is that it maybe doesn't offer enough new stuff for someone to make the effort to switch. Scala clearly does add a lot of value, so that should be a lesson for newcomers. Offer enough new stuff for people to be interested.
I'm glad he at least mentioned Fantom. I haven't done much other than play around with it, but it seems like a much prettier "better" Java than a lot of the other contenders. I've never understood why it hasn't "caught on." Maybe he's right, maybe it just isn't different enough to be compelling.
It's kind of like nemerle, a ML-inspired language with lisp-type macros for .NET, very cool but you don't hear anything about it.
Basically, for JVM environment you have a lot of noisy judgments around language uptake: the big 4 (scala, JRuby, groovy, clojure) and the little 3 (Ceylon, kotlin, gosu).
I like Scala, though I just dabble in it. But I have a few thoughts on why it will be difficult for it to be mainstream.
One of its greatest features require a meaningful rethink of the JEE stack. Actors passing messages seems to not really work in a one thread to one request world where you should fork new threads.
There are too many ways to do the same thing in it. Manipulating maps or list can be done with various features of the collection library. This becomes the Java version of Perl. Some developers will use $_, some prefer variables and they each prefer their own ways. It can make it hard for one developer to pick up where the other left off.
Finally, the documentation seems to be more complicated than necessary. The Scala version of JavaDoc available on their site is almost a difficult to navigate as MSDN. From here we go to the books about Scala. These take careful reading to glean even the most basic structures (took me a while to figure out that the primary constructor is all of the lines between the {} of a class that isn't encapsulated by a method declaration).
Actors ... seems to not really work in a [JEE setup].
Then don't use Actors, you can still use the rest of the language and you're still a lot better off than Java.
There are too many ways to do the same thing in it. ... This becomes the Java version of Perl.
Problems that only manifest once you have a large code base aren't barriers to adoption. Mainstream languages would be a lot better if they were! After all, Perl became widely adopted, so this didn't hurt Perl from being adopted and may even have helped.
Finally, the documentation seems to be more complicated than necessary.
I agree, and this is a problem for adoption right now. The documentation is the opposite of K&R's book on C. However, this can change easily, since third parties can write books about Scala. It's not like changing a language feature, where it takes a committee 10 years to actually make the change. Anyone can write a book, and we're starting to see that: the O'Reilly book on Scala is a really good introduction.
>Problems that only manifest once you have a large code base aren't barriers to adoption.
Ye Gods. Of course it is. If your code base is small you can pretty much get away with using anything. It's only when the code base is large enough to make maintenance challenging that differences between code paradigms start to matter.
If scala is only good for the sorts of projects PERL can handle, why would I stop using PERL?
In my view, Scala is good for projects where using Java is too complicated and you can use better abstractions.
I would argue that Scala helps to keep your code base smaller and easier to manipulate (due to extra type safety).
In any language, a big codebase needs coding standards and the project develops it's own "culture". You have the same multiple approaches problem in Java: how do you search for items in a collection?
>In my view, Scala is good for projects where using Java is too complicated and you can use better abstractions.
I have yet to run into a project for which the use of Java is too complicated, and I'm concerned the designers of Scala have made a few mistakes of the kind you see in C++, like operator overloading.
To date, I have only dabbled in a few Scala scripts on top of an existing Java code base. I found it straight-forward for that job (albeit a small job). I found the "scaladoc" to be a bit sparse, but otherwise navigable. I mostly like the Scala book that the Pragmatic Programmers published (forgot author's name), other than the slow intro.
I'm sure my use of Scala would disappoint the first interviewee, but it was an effective use-case for me. Use the index on the book to scan for likely topics, then round things out with Google.
I found the IDE support a bit broken in NetBeans (6.9). I suspect that the Scala plugin was incompatible with my vi/vim plugin, but I'm not sure. (it would go into a mode where the editing keys would stop working)
I don't use Scala but I appreciate the fresh ideas it has brought to the Java /JVM ecosystem. Think Jetlang Actors modeled after Scala actors or Functional Java library etc. or even Google Guava ,which although has nothing to do with Scala but promotes a succinct programming style.
The problem with scala and other non mainstream but powerful languages is that they are just ugly; no amount of marketing and feature lists will make them attractive because aesthethics are hard wired into our brains; at a low level ugly equals misery and pain, at a higher level its just an indicator of maintenance problems.
Perl got away with it because at the time because there were not many options for scripting, now Python and Ruby are now dancing on its grave.