|
|
|
|
|
by jameshh
362 days ago
|
|
> 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 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: f x y z -> f(x)(y)(z)
f x (y,z) w -> f(x)(y,z)(w)
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. |
|