Currying allows simple partial application; if A is a function that "takes 3 arguments" (i.e. it has type `w -> x -> y -> z`, which means that it takes an argument of type `w` and returns a function with type `x -> y -> z`, which takes an argument ...), you can say e.g.
A_ = A B C
E1 = A_ D1
E2 = A_ D2
where `A_` is the partially applied function `A`.And you and he both gave evidence to the initial assertion that "it's confusing".
The rule is simply "The first expression is a function, all following expressions are arguments to that function"
It's no different than "The first symbol is a function, all comma-separated, parentheses-bound expressions are arguments to that function"
Both are pretty easy syntactic rules, I think.
for all arguments in the function
if the argument is not a symbol surround it with parentheses
delete all commas
delete the two initial parentheses
And an algorithm for converting Haskell calls to C calls: put an open parenthesis between the first expression and second expression
put a close parenthesis at the end of the expression
put commas between all expressions between these two parentheses
The fact that it's so easy to convert between them highlights to me that they are both pretty easy.The syntax is "The first expression is a function, all following expressions are arguments to that function". Fullstop.
It would be unfair of me to say "C has confusing and ambiguous calling conventions, the compiler complains if I write A(B(C(D))) as A(B,C,D)"
Because you would respond "Well of course, that's just the calling conventions of the language!"
To which I say "Exactly"