|
|
|
|
|
by kmiroslav
3658 days ago
|
|
> It has better type classes Haskell and Scala win and lose on different criteria but for type classes, I find Haskell's syntax and semantics infinitely more elegant, more terse and more flexible than Scala's. Defining type classes in Scala is a cacophony of syntax boiler plate riddled with implicits and brackets. Haskell is much more elegant in that area. |
|
Haskell's type classes are a mess because Haskell-the-spec (anti-modular, coherent) and Haskell-the-language (incoherent, "modular") work completely different and nobody cares and there us no real fix because both options suck, as soon as your project consists of more than one module.
It's the reason why no language after Haskell does type classes the Haskell way, and all of them do it similar to Scala's approach.
Could Scala have more syntax sugar? Sure! But people are more focused on getting them right first, before adding additional syntax.