Boost logo

Boost :

Subject: Re: [boost] painless currying
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2011-09-05 14:11:12

On Mon, Sep 5, 2011 at 1:28 PM, Daniel James <dnljms_at_[hidden]> wrote:
> On 5 September 2011 12:10, Maxim Yanchenko
>> I'm on Dave's side here: we should be explicit about the time when we want to
>> trigger actual evaluation.
> The problem is that existing generic algorithms won't trigger
> evaluation, so currying couldn't be used with, say, std::transform.
> That's why I would make partial application explicit, with a normal
> function call causing evaluation. But I think that was considered too
> verbose.

Actually, that is not the case. If you take phoenix, bind or lambda,
and call the resulting functor with not enough arguments it will give
you a pretty ugly error.
And this is what the currying is about ... return another functional
if the supplied arguments aren't enough to evaluate the lazy function
What you mean is you supply too much arguments. Which won't be affected.

Boost list run by bdawes at, gregod at, cpdaniel at, john at