|
|
|
|
|
by skybrian
357 days ago
|
|
I think that’s true as far as it goes, but there are further reasons why Haskell is more difficult. Here is one: In Haskell, the lack of parentheses for function calls plus currying means that to read a function call, you need to already know how many arguments the function takes, which I feel adds a new level of difficulty over languages where you can often guess what a function does based on its name, without looking it up. As a result, often Haskell reads more like math, where without knowing each symbol’s definition, you’re lost. I’ve seen cryptic JavaScript too, but less often. |
|
While I agree with the general sentiment of what you are saying, note that the syntax has nothing to do with it, it is purely about Haskell using currying excessively. The syntactic translation between Haskell and JS is straight-forward and 1-1:
I agree that excessive currying is not great, and generally push for non-curried arguments unless a curried form realy is used in practice. But for this to really be comfortable, and to still enjoy all the hgiher-order programming that's nice with Haskell, we would need good records (strucural, anonymous, extensible), which it doesn't really have right now, so we are stuck with currying.