Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

But when that language has variadic parameters, you must explicitly invoke the currying to distinguish it from a normal function call that uses up all the variadic parameters (just as you can't specify different types for the variadic parameters). In a language where each function has only one parameter, the currying can be implicit (just as all parameters defined in the program can be statically typed).


You can have "implicit" currying behaving as you described in a dynamically-typed, strictly evaluated language as well.


I should have written "You can, but..." in front of my comment above because you weren't disagreeing with me. In my original comment I italicized "must be variadic" which was my original emphasis.

But if you eliminate variadicity and macros from a dynamically-typed, strictly evaluated language, you might as well add optional static typing so you can extend that implicit currying into monads, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: