or whatever ‘a function call with zero arguments’ is in this language.
Well, in standard Hindley-Milner, there’s no such thing. Every function takes one argument and returns a value, which might itself be a function.
It’s conceivable that some extension could change that, and yeah, syntactically distinguish between + the variadic function, and (+) the result of passing no arguments to +. I don’t think any of the schemes listed in this post would make that distinction though. The Zip Calculus’ version of “passing no arguments” would be “passing an empty tuple”. The typeclass approach would distinguish them by typechecking, and I think Infinitary Tuples would too.
See also:
I don’t consider this valuable[1]. I think it should instead be:
...or whatever ‘a function call with zero arguments’ is in this language. (I’m assuming
(f)
means ‘call f with zero arguments’).Mainly because there’s no way to have multiple associative functions with the same zero element that doesn’t compromise on some identity otherwise.
Well, in standard Hindley-Milner, there’s no such thing. Every function takes one argument and returns a value, which might itself be a function.
It’s conceivable that some extension could change that, and yeah, syntactically distinguish between
+
the variadic function, and(+)
the result of passing no arguments to+
. I don’t think any of the schemes listed in this post would make that distinction though. The Zip Calculus’ version of “passing no arguments” would be “passing an empty tuple”. The typeclass approach would distinguish them by typechecking, and I think Infinitary Tuples would too.I keep forgetting standard HM is that restrictive.