Version NumbersTopMigrating to the New SchemeThe Force of ConventionContents

The Force of Convention

In passing, it turns out that the old Scala 2.7 rules are the same as the rules in C# and other .net languages. So why did something that obviously works on .net cause such problems on the JVM? It's a matter of expectations and conventions. In .net, which has nested namespaces similar to Scala's packages, nobody in their right mind would have defined a namespace org.System because it would shadow the well-known top level System namespace. On the JVM, people do this sort of thing, and it works, because of Java's absolute package name convention. So this experience shows that sometimes a design cannot be judged to be right or wrong only along technical criteria, but that it matters how it fits with the pre-existing conventions and expectations of its users. Scala 2.7's nested packages are a simple design which works well on .net. It did not work so well on the JVM because conventions there were different. In 2.8 we fixed the problem by giving a new twist to the interpretation to package clauses.

Next: Version Numbers


Version NumbersTopMigrating to the New SchemeThe Force of ConventionContents