Can we stop calling it currying?
21–30 of 44 posts
Re: Can we stop calling it currying?
#22That's why Clojure calls it "partial" to indicate you're doing partial application http://conj.io/store/v0/org.clojure/clojure/1.7.0-alpha4/clj...
Re: Can we stop calling it currying?
#23I don't recall currying -- either the name or the concept -- being a particular stumbling-block for beginners trying to learn functional programming. There isn't really a problem that needs solving here.
Re: Can we stop calling it currying?
#24While your suggestion suffers from a lack of concision, the point remains: A single word replacement that approximates the nature of what "currying" does, would be helpful.
Re: Can we stop calling it currying?
#25I've read any number of peeves against certain forms of language use, and don't agree that that necessarily pigeonholes someone into marketing. Lisp, for example, uses 'car' and 'cdr' because of the hardware registers of the IBM 704. Some prefer 'first' and 'rest', but compact composed versions like '(cadr x)' for (car (cdr x)) don't exist for those English variants. "to curry" as a verb has advantages over your pref…
"Some prefer 'first' and 'rest', but compact composed versions like '(cadr x)' for (car (cdr x)) don't exist for those English variants."
It may be lack in my mastery of English, but AFAIK, 'cadr' didn't exist, either, but that didn't stop it from becoming the standard way to describe the second item in a list.
If they had used first and rest, we likely would have frest and frrest for cadr and caadr, and I wouldn't rule out 'rfirst' either; it is not as if that is harder to pronounce than 'cdar'.
Re: Can we stop calling it currying?
#26I have also learned a good deal more from these comments and further research. It seems my idea of "currying" was not entirely complete. Per the comment herein: "Currying turns polyadic function into a sequence of unary functions". Practically speaking, this means a curried function is a single-input function that will return a function which is still awaiting an argument, so that other functions can be added to the "currying chain".
I would call this "function sequencing". This term could be equally intuitive for functional languages (ML / Haskell) and non-functional languages alike. However, I think that non-functional language users will still appreciate an explanation that references "argument deferral", since this is one of the practical benefits, and is also the key part of the "functional" context-switch needed to understand the concept (i.e., you can compose functions without providing the arguments/inputs).
Is there an equivalent to "uncurrying"? (un-what-ing??) This verbiage sounds like we're trying to unpluck a chicken. On Wikipedia (the world's collective brain dump), we understand uncurrying to be "the dual transformation to currying, and can be seen as a form of defunctionalization." Crystal. I'll losely interpret this as flattening the unary (single-input) function sequence into one polyadic (multi-input) function. So can we refer to this as "function bundling"?
To summarize, I'm submitting "sequencing" and "bundling" as the two simple verbs that better describe "currying" and "uncurrying".
Re: Can we stop calling it currying?
#27Completely agree. It is atypical in any progamming language to have names of functions/operators that do not bear some relation with the nature of the function/operation. While your suggestion suffers from a lack of concision, the point remains: A single word replacement that approximates the nature of what "currying" does, would be helpful.
Re: Can we stop calling it currying?
#28Thanks everyone for the comments. It is interesting to see how widely "currying" is conflated with "partial application". I have to say, I still find the name to be a stumbling block. Perhaps this discussion can help to reverse that trend. I have also learned a good deal more from these comments and further research. It seems my idea of "currying" was not entirely complete. Per the comment herein: "Currying turns pol…
Re: Can we stop calling it currying?
#29I've read any number of peeves against certain forms of language use, and don't agree that that necessarily pigeonholes someone into marketing. Lisp, for example, uses 'car' and 'cdr' because of the hardware registers of the IBM 704. Some prefer 'first' and 'rest', but compact composed versions like '(cadr x)' for (car (cdr x)) don't exist for those English variants. "to curry" as a verb has advantages over your pref…
'To curry' also already was a verb, and as a bonus, that verb has the connotation of 'adding something'. To curry a function, you add a value for its first argument. That helped it become popular. I don't think this would have survived if it would have been called 'to Knuth', 'to Kernighan', or 'to Jensen' (in general, names for stuff one adds in moderation to something larger to improve it give good names for small…
Re: Can we stop calling it currying?
#30To answer your question, I don't think it matters what it's called, just that you learn what it means (just like any word). As an aside, what you're describing isn't strictly currying. The key insight of currying is that a function of multiple arguments can be decomposed in to a series of function applications where each function takes only one argument - this is related to but not the same as partial application.
So in this case, not only CAN these people stop calling it "currying", but in fact they should, because it's the wrong word.
In my other comment I'm suggesting calling currying "sequencing", and partial application "presetting".