Tuesday, March 4, 2008

Where is Scala heading?

This is my first post on Scala Blog, so sorry if it's too philosophical. I promise to show some substance soon :)

As I'm learning my way with Scala one analogy cannot escape from entering my thoughts. The analogy is (of course?) Haskell.

However I don't mean the way the language is built up, but rather the way it's governed. Both Haskell and Scala are designed and implemented by brilliant scientists, who are the benevolent dictators when it comes to choosing the language features. In the Haskell case it's the Simon Marlow and Simon Peyton-Jones behind the GHC compiler along with a very active community with a lot of outstanding members. In the Scala case it's Martin Odersky and the LAMP.

Such a setup means that the language leaders are highly aware of the decades of computer science research and can pick the best and innovate on top of it. This is great, because you get substance instead of the buzzwords. However this also means that they are driven by success in research community.

What is the problem with that? Well, Martin is the professor at LAMP, which today means he has to teach and produce papers. However, to publish papers one must be constantly innovative, since CS conferences do not readily publish just case studies and tech reports. Since his main focus seems to be Scala it means that the language is constantly evolving to accommodate the innovation needed to get published.

The drive for innovation by itself is wonderful. However a programming language is a relatively fragile thing, since it must fit into the imagination of potentially millions of people. But when it's constantly improving it is hard to fit it in. Just look how much trouble introducing Generics caused to Java programmers.

The reason why I started with Haskell is that situation in that community is even more extreme. While Haskell 98 report standardized a relatively conservative language almost everyone today will use the GHC extensions. And those take by now the largest part of the GHC user guide and are often underdocumented and hard for a newcomer (and sometimes an experienced Haskeller) to understand.

The Scala changes are perhaps not so extensive and we are definitely dealing with a more practical language, but still the change log in the end of Scala spec makes for quite a long read. And since I love the language itself and the people behind it I would be very interested to know what are the goals and how long will Scala continue to evolve before slowing down.

(also at dow.ngra.de)

4 comments:

Daniel said...

While I agree that perhaps the Scala language is evolving faster than it should, I'm not so sure that it's as problematic as all that. Those of us who have bothered to learn Scala have done so because we like new languages with shiny new features. Scala's evolution caters to this Personality trait (if you excuse the pun). However, before it can see mainstream adoption, Scala will have to settle down and establish itself as a dependable platform on which the next killer app may be built.

To Dr Odersky's credit, he has mentioned in a few interviews that Scala's feature growth is nearing a plateau, and there will be very few large changes in upcoming releases. While there are a few additions that I would personally root for, I think this is on the whole a good thing. If Scala's features settle down a bit, it will seem a lot less like an experimental research project and more like the potential Java-killer that it is.

Jevgeni Kabanov said...

My point is that Scala looks very much like Haskell a few years ago. Quickly evolving and very few real applications. However IMHO Scala's potential to bridge the gap to mainstream is much bigger, due to interoperability with Java and OO nature. But a lot of Java programmers will give up if features are constantly added.

Alex said...

There seems to be a lot of research happening that EPFL/LAMP around Scala and even outside of that group. Not all of this research actually materializes and ends up being merged into Scala. There are failed experiments, there are experiments that don't lead to anything substantive.

It should be noted that M. Odersky is not pushing everything from research into Scala. Based on my observations, he is careful and selective about what is added to the language. While I agree the language has been evolving rapidly over the last 2 years, I think this has been a good thing and I can't think of any feature that I would actually argue for removal.

I think what's needed is to start thinking about "stable" and "unstable" branches of development to cater to the needs of conservative industry professionals while simultaneously providing a sandbox for gradual introduction and integration of new features, and for prototyping/research to happen in a more controlled environment (but still in the open so the wider community is involved) .

Michael Nischt said...

Actually, I don't see a problem in main versions being incompatible to some extent.
However, when being used in a lot of industry projects Scala 2.x has to be supported until Scala 4.0 maybe. Not sure if maintaining 3 versions can be done be LAMP alone...