Boost logo

Boost :

Subject: Re: [boost] Phoenix review
From: Giovanni Piero Deretta (gpderetta_at_[hidden])
Date: 2008-09-25 09:09:54

On Thu, Sep 25, 2008 at 2:54 PM, Giovanni Piero Deretta
<gpderetta_at_[hidden]> wrote:
> On Wed, Sep 24, 2008 at 10:00 PM, Doug Gregor <dgregor_at_[hidden]> wrote:
> <snip>
>> Is "lambda" equivalent to BLL's "unlambda" or "protect"?
> as far as I can tell no, because boost::lambda::protect(f) is
> basically the identity, except that it changes the type of 'f', hiding
> its 'lambdiness'.
> OTOH phoenix::lambda[f] returns a stub that in turns returns 'f' (I
> didn't check if the type of 'f' is changed). The phoenix machinery
> makes sure that when used as a nested lambda expression, lambda[]
> actually work more or less like protect. The abstraction break if you
> use lambda[] as top level.
> For more on this topic, see my comments about phoenix on another mail.

Sorry for the confusion, I keep confusing protect and unlambda. I
still find the need of adding another evaluation round to the result
of lambda surprising.


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