4 ms·
Our company uses both Scala and Haskell for revenue-producing projects. There's a lot that goes into choosing a language for such projects. I think it's fair to
by ericssmith 14y ago
Our company uses both Scala and Haskell for revenue-producing projects. There's a lot that goes into choosing a language for such projects. I think it's fair to say that Scala is not really a beginner friendly language, nor do I think it is meant to be. Odersky's Coursera course is pretty heavily inspired by SICP (see 'Scala by Example' for an earlier manifestation of this material). And SICP was definitely designed to be used as an intro to programming. But as anyone who has gone through SICP can attest, it's probably not the best choice for a lot of people. But the Coursera Scala course is good in much the same way that SICP is. It is deep and well designed. Just not for everyone.
Haskell has relatively simple syntax and coherent semantics (being unencumbered by a 'foreign' VM eco-system, such as the JVM). As such, it is somewhat easier to get into. But to quote Gerry Sussman (co-author of SICP and Scheme), 'Haskell is the most advanced of the obsolete languages'. It gets deep pretty fast. You don't learn Haskell, so much as get initiated into it. It's an ongoing process. This can be said of Scala as well. Neither are particularly small languages when you consider their entire respective eco-systems.
In general, if you are already competent in a mainstream, dynamic language, and want to get your feet wet in functional language concepts, diving into Haskell is not a bad idea; but you are not likely to stick with it. I would recommend Clojure for such people. However, if you are already a Java programmer (and don't completely hate it), then the transition to Scala will be tough, but somewhat gradual. It is designed to be. But I would also say that the Scala world (not so much the language itself) is easier to grok if you know Haskell to at least an intermediate level. I think it is worth the time to learn Haskell and build something useful with it. It does not need to precede learning Scala, however.