Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-06-28 22:01:36


Daniel Walker wrote:
> I took a brief look at this. As far as I could tell Atry's library is
> stateless. So, it can only support a subset of the expressions that
> Boost.Lambda supports... namely those without state; i.e. all the
> parameters need to be unbound. So, it can do
>
> _1 << _2 << _3
>
> ... but not ...
>
> cout << _1 << endl
>
> I'm not sure that this wins you a time savings over Boost.Lambda,

If stateful lambda object isn't small enough to fit into boost::function
buffer, it could save you one dynamic memory allocation for each object.

> but I believe it could win you a space saving if the static function can
> be inlined.
Or quite the opposite. Though, I hope people don't write big scary
lambdas expressions.

> I wonder how this relates to the anticipated rewrite of lambda using Phoenix.
me either.

-- 
Alexander Nasonov - http://nasonov.blogspot.com
How we spend our days is, of course, how we spend our lives. --
Annie Dillard --
/---------------------------- Fortune script ----------------------------\
curl 'http://www.quotedb.com/quote/quote.php?action=random_quote&=&=&' | \
    sed -e "s/^[^']*'//;s/.);$/ --/;s/<[^>]*>//g;2s/^.\{17\}//"        | fmt

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