Boost logo

Boost :

Subject: Re: [boost] phoenix::bind
From: Joel de Guzman (joel_at_[hidden])
Date: 2008-10-02 09:41:34


Giovanni Piero Deretta wrote:

> As I said elsewere, the extra round is hidden when lambda is used to
> protect a nested expression, but it shows when used a top level:
>
> lambda[ for_each(arg1, lambda(_a = arg2)[push_back(arg1, _a)])] () (r, i);
>
> There is really really no need for the extra '()' there. There are no
> local variables in the outer lambda and even if there were, the user
> can initialize them with lambda(/* init here*/)[...]

Ok, this I agree.

Again, if you read my earlier post on the plan to unify these,
this is actually my intention:

    ...

Oh my, there's a lot of discussion I can't find that snippet
of information. Anyway, it has something to do about using
the "let" semantics be applied to "lambda" only on the
top level. I think it will work with the lambda syntax and
behavior you sought for.

Regards,

-- 
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

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