Boost logo

Boost :

Subject: Re: [boost] New libraries implementing C++11 features in C++03
From: Joel de Guzman (joel_at_[hidden])
Date: 2011-11-23 05:19:01

On 11/23/2011 5:17 PM, Daniel James wrote:
> On 23 November 2011 02:21, Joel de Guzman <joel_at_[hidden]> wrote:
>> As mentioned again and again,
>> a good approximation of lambda is already existing in Boost. Namely: bind,
>> lambda and phoenix.
>>From the lambda paper, "Unfortunately, this elegant solution suffers
> from serious problems in terms of usability, implementation
> complexity, and performance". I don't think I'd use local, but it
> seems clear that while the final result might be uglier, it's a lot
> less work to get there.
>> Keep in mind that Boost has been at the forefront of C++ library development.
>> It is because of these libraries that push the limits of C++ that we see the
>> advancement in C++ that we enjoy now in C++11. Case in point is Boost Lambda
>> authored by Jaakko Jaarvi ( which ushered in C++11 lambda:
> That paper seems to see boost lambda mainly as an example of what not
> to do. C++11 would probably have lambdas regardless of boost; their
> importance and the difficulties in implementing them in a language
> like C++ were well understood already.

The paper lists down the limitations of a library based lambda solution
and why we need lambda in the language. While I agree that C++11 would
probably have lambdas regardless of boost, I'm quite sure that the
development of Bind, Lambda, Phoenix and FC++ was instrumental in
the development of C++ lambda. At least 3 of the authors were proponents
and/or authors of library based lambda solutions.


Joel de Guzman

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