Live data from Hacker News

Can we stop calling it currying?

news.ycombinator.com

41–44 of 44 posts

Re: Can we stop calling it currying?

#41
post #40

Sometimes you do not want an understandable name for a thing... instead a merely memorable one is far better. Currying is actually an incredibly specific and universal thing. It's the act of noting that a function space (a, b) -> c is the same as a "higher-order function space" a -> (b -> c) in a very particular way. It's worth it to give this thing it's own name because it's a highly important and unique transformat…

This makes sense. But would you say that there could be easier shorthand descriptors to supplement the terms? Or perhaps terms that are used to describe the utility of currying, but don't actually replace the specific (and useful) term?

Re: Can we stop calling it currying?

#42
post #5

Why call them 'arguments' when nobody is arguing? Currying is the name of the thing. Adding another Enterprise Edition Operational Process Development Pattern like "argument deferral" isn't any better. I mean "Dependency Injection" isn't any easier for beginners to grasp, even though that is what it is. Besides, it isn't argument deferral. That could easily be confused with evaluation order or things like lazy/normal…

From the perspective of a non-functional language, it is argument deferral because you're composing your sequence of functions first, which can then be used by later adding inputs for evaluation. Were you thinking of partial application (not the same as currying)? I would agree that this is not argument deferral, rather it's more like argument presetting.

No, I was thinking about what I said: evaluation order and evaluation method.

For instance, if I had a function like

    func(a,b)
with the semantics that a would be evaluated before b, it would be perfectly reasonable to allow someone to evaluate argument b first instead. Thus 'argument deferral': you defer the evaluation of a until after b.

The second case is about when the arguments are evaluated: do you evaluate them when the function is called, or do you defer evaluation until when they are used? This is obviously 'argument deferral' as well, but we usually call it lazy evaluation.

http://en.wikipedia.org/wiki/Evaluation_strategy

The term 'Argument deferral' could apply perfectly well to a discussion of Evaluation Strategy, even though that has little to do with currying.

Re: Can we stop calling it currying?

#43
post #40

Sometimes you do not want an understandable name for a thing... instead a merely memorable one is far better. Currying is actually an incredibly specific and universal thing. It's the act of noting that a function space (a, b) -> c is the same as a "higher-order function space" a -> (b -> c) in a very particular way. It's worth it to give this thing it's own name because it's a highly important and unique transformat…

This makes sense. But would you say that there could be easier shorthand descriptors to supplement the terms? Or perhaps terms that are used to describe the utility of currying, but don't actually replace the specific (and useful) term?

I think it's fair to say that pithy ways of explaining the point and mechanism of currying are important. The terms you've been exploring here are definitely in that bucket.
Post reply on HN