Re:Solving `UK Passport Application` with Haskell
by skybrian on Sunday June 29, 2025 @10:54AM
(#44413653)
Yes, you could write the same thing, but defaults and language conventions matter. Writing curried functions in JavaScript is awkward enough that nobody does it by default. If you did, people would ask why in a review.
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.