4 ms·
The common opinion is that Scala is a poor man's Haskell, with few of the strengths and more weaknesses. It's seen as, at best, a stepping stone from imperative
by trobertson 12y ago
The common opinion is that Scala is a poor man's Haskell, with few of the strengths and more weaknesses. It's seen as, at best, a stepping stone from imperative languages to "real" functional languages.
- continuations 12y agoI see. What are the perceived weaknesses and lack of strengths of Scala as compared to Haskell?
- the_af 12y agoI cannot speak for the either the Haskell or Scala communities, being a newbie in both, but here is my opinion of why Scala is "the poor man's Haskell": - Scala's type system feels at the same time more complex and less powerful. It has worse type inference, for example. - Being a hybrid language, Scala offers fewer guarantees than a pure FP language. For example, its type system isn't adequate to express and constrain side effects. - Scala seems more verbose and less elegant than Haskell to me. - Compatibility with Java means Scala has some warts like allowing nulls. Yes, you have the Option type. But something you expect to be of type Option can still be null due to carelessness! - Some libraries used by the Scala community, such as Actors in Akka, seem to eschew the static type systems that's the raison d'etre to use something like Scala (or Haskell) and seem a lot like dynamic typing, except without the simplicity of dynamic typing. - Lastly, the highly opinionated "Mostly functional programming doesn't work" [1][2] [1] http://queue.acm.org/detail.cfm?id=2611829 http://queue.acm.org/detail.cfm?id=2611829 [2] https://news.ycombinator.com/item?id=8084302 https://news.ycombinator.com/item?id=8084302
- frowaway001 12y agoI think the issue is that Haskell people basically assume that if they don't have feature X themselves, it has to suck and can't count as a strength of another language. For instance, Scala's OO/module system is one of the best ones out there, but is readily dismissed by Haskell people, despite modularity being a complete train-wreck in Haskell.
- tel 12y agoPersonally I feel most Haskellers wish that Haskell had ML style modules—there just needs to be a way to make them play with Typeclasses properly. It's being actively worked on at this moment, actually! I think there's a good argument, albeit one I'm not qualified to make, about whether Ml modules or Scala objects are better.