It's a fair question, I've actually been thinking about writing
something about this over the last couple days, since scanning through
Alex Payne's new oreilly book which I made a friend buy :)
Like you say, we clearly do like Scala. It's an improvement over Java
in a lot of ways. But I think if your focus is on maintainable, large
corporate systems, you would make some different design decisions.
Scala has static methods and statically modifiable state, in a big
way, by having object separate from class. This is death to
testability, as you cannot mock out a call to a static method. Even in
the Noop interpreter, I already have an example [1]. I'm forced to
have an object as my entry point, and would like to have the JVM exit
with the exit code returned from the program I'm running, so I need
System.exit. But I want to test my main, and System.exit will kill the
test runner. So I have to build the mock into the production code. If
you use a third-party scala library, you'll be stuck with that sort of
un-replaceable dependency, and they really hurt when they touch the
boundaries of your program, like parsing options, dealing with I/O,
and so on.
The syntax lends itself to unreadability. If you look at some gnarly
scala code, you'll see nested left-folds with underscore for the
captured variable, or spaces as a DSL where the parity of the number
of words determines the order of method calls. Optional semicolons
where the statement may not continue on the next line, or may mean
something different. All of that stuff feels nice to write, but not as
nice in a code review, or when you're browsing the code trying to spot
where your bug might be hiding. It's reminiscent of obfuscated perl.
We prefer to be explicit with all that stuff. As another example, look
at the problem with relative package names in imports. In Scala 2.8,
there will be two different semantics for the same syntax, to try to
fix the issue with hiding classes that have ambiguous relative parents
with the same name. I think this was to "avoid typing", which I feel
strongly is a tooling problem, not a language problem. "Avoid typing"
also favors the code writer over the code reader which we think is
backwards.
As to your point about developing something within the Scala ecosystem
that can meet our goals, that's a fair observation. Scala does allow a
great flexibility in how libraries can be used, for a statically typed
language. How do we avoid you falling into the problem with statics,
though? And how does the dependency injector get bootstrapped? I feel
like our library would need to make you code in a non-Scala idiom, and
you'd have to ask your team to remember to use our library all the
time. We might also have to wrap a lot of the standard libraries.
-Alex