Boost logo

Boost :

Subject: Re: [boost] phoenix::bind
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2008-10-02 16:55:01


On Thu, Oct 2, 2008 at 8:58 PM, Peter Dimov <pdimov_at_[hidden]> wrote:
>> for_each(arg1,
>> lambda(_a = arg2)
>> [
>> push_back(arg1, _a)
>> ]
>> )
>
> ...
>
> I'm not an expert on modern FP, but the above lambda doesn't seem like a
> classic lambda (as in lambda calculus and Lisp) to me.
>
> Now that I've seen what Phoenix can do, I think that, were I to design a
> Boost.Lambda2, I'd probably go with a classic lambda of the form
>
> lambda( _x, _y )[ _x + _y ]
>
> where the inner _x + _y is not a function object, and it is the lambda[]
> that turns it into one. (That is, the evaluation of an inner expression
> would be done with eval(expr, args...) and not with expr(args...).)
>

Oh yes please! Unfortunately I think that this would require major
surgery of phoenix...

-- 
gpd

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