tags:

views:

248

answers:

4

Why is Scala binary incompatible between different releases?

+1  A: 

It's still relatively young and undergoing active development.

There are some changes in the new release that were anxiously awaited and that help with a lot of problems, but it wasn't possible to make them backward compatible.

Because Sun is kind of restrictive about updates, Java changes rather slowly, and usually tries to remain backward compatible to the bitter end. Sometimes this stands in the way of progress, but big companies love a stable language.

Scala, on the other hand, is in the hands of a small group of academics, and it's not (yet) widely used in the industry, so they have (or take) some more freedom with changes.

Carl Smotricz
A: 

Umm, no. Get your facts straight. There was no recompilation needed* when going from 2.7.2.3b1 -> 2.7.2.3b2, which was a real relief for me because of the large customer base we had with entrenched legacy code using 2.7.2.3b1 features.

*Caveat - unless you foolishly used code in scala.collection._ or scala.xml._

Mitch Blevins
+7  A: 

It has to do with the way traits are compiled, because traits are kind of like interfaces but they can contain implementation. This makes it so it is VERY easy to make changes that don't break source compatibility but break binary compatibility, because when you add a new method to a trait along with an implementation, you have to recompile everything that implements that trait so that they will pickup that implementation. There's probably other issues, too, but I think they're mostly along the same lines.

Erik Engbrecht
+2  A: 

Lack of JVM support for Scala-specific features, such as traits mentioned, and the fact that it is actively evolving.

Daniel