Boost logo

Boost :

Subject: Re: [boost] painless currying
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-08-24 16:27:00


On Wed, Aug 24, 2011 at 12:42 PM, Eric Niebler <eric_at_[hidden]> wrote:

> On 8/24/2011 12:55 PM, Dave Abrahams wrote:
> >
> > on Wed Aug 24 2011, Eric Niebler <eric-AT-boostpro.com> wrote:
> >
>
[...]

> >> As soon as enough arguments are collected to call the curried function,
> >> it gets called. So in this case, f(1) calls f::operator()(int).
> >
> > That's an asymmetry about most currying syntax that I never liked, at
> > least for C++.
>
> Could you explain what you mean by asymmetry here? That my currying code
> prefers one function over another based on the available arguments?
>

I think the asymmetry that Dave is referring to is that some applications of
a curried function just...well...curry the argument, while others actually
evaluate (immediately!) the underlying function with all the previously
curried arguments in addition to the given argument. So there is an
asymmetry in the effects of function application. At least, that's what I
immediately thought of when seeing Dave's comment.

- Jeff


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk