by michaelochurch · 13y ago · 0 comments
If you have a 2000-file program with cyclical dependencies you are screwed. If you use Scala-IDE (which has an embedded sbt doing incremental compiles, which become non-incremental if your dependency structure is fail and you have a huge SCC) on such a project you are doubly screwed. That's not a problem with Scala. Bigass programs aren't a good idea in any language. The programmer-to-program relationship should be one-to-many (for engagement, productivity, modularity, code quality) and not the "enterprise" reverse.
See: http://c2.com/cgi/wiki?ConservationOfComplexity
Ultimately, the baseline requirements drive the minimal complexity of code. Sure a poor programmer can drive up the complexity with unnecessary constructs, but the converse is not true: a great programmer can drive to simplicity. For example, a flight control system for a 777 can never be reduced to a single file of 700 lines of code. It will likely always be 2000+ files, and have lots of inter-dependencies.
So I guess (run time safety issues of Scala aside) Scala is not an appropriate language for complex problems by your own words?
You mentioned flight control systems: those are unlikely to be written in Scala, being real-time systems, but if one were, it would not need to be compiled and recompiled on the fly.
Scala's a great language but it's not the right language for every problem. No language is.
For many large, non-trivial systems have several requirements: - tends to have complex dependencies - needs fast builds
This was a classic: http://www.amazon.com/Large-Scale-Software-Design-John-Lakos...
Essentially how to design C++ systems so that incremental compiles don't sink you. Developer productivity is important.
Scala is badly failing on this front IMO, it reminds me of the old bad days of C++ in a major way.
If you don't want a cutting-edge, powerful static type system there's an awesome JVM Lisp (Clojure) that I recommend highly.
Anyway, type-checking is probably the fastest part of compilation so there's no reason to give up Hindley-Milner for speed reasons. (One of the best features of GHC is that you can use GHCi to typecheck)
Both Haskell and Scala have some excellent work behind them, but they were built under different constraints.