Boost logo

Boost :

From: Aleksey Gurtovoy (agurtovoy_at_[hidden])
Date: 2002-03-28 13:36:11

The formal review period for the Lambda Library by Jaakko Järvi and Gary
Powell has ended, and the library has been accepted into boost, pending the
incorporation of suggestions brought up in the review. In addition to the
public comments in favor of the library, there was one private comment
urging acceptance.

Thanks to everyone for all their comments, and to Jaakko and Gary for being
very open and responsive to them!

Below is a list of issues that should be resolved before the library is made
a part of the boost distribution (some of those have been already reported
as addressed in a separate CVS branch).

1) Arity handling; most of the reviewers voted for the approach taken by
Peter Dimov's Bind library.

2) Control structures syntax; there has been an agreement that Phoenix
library's syntax of lambda control structures (if_()[].else_[]) has a better
readability, and that the LL should adopt it.

3) "Weight" of the library and separation of the features; a few of the
reviewers expressed an opinion that the library is over-designed, and that
some of its advanced features are unnecessary and should be removed; the
library authors have stated that most of the controversial features are not
a part of the library core, can be viewed as extensions, and can be included
separately; they also argued that there are situations when these features
are useful, and that having them in the library does not hurt users because
the library is designed to make sure that you don't pay for what you don't
Overall, their arguments have been convincing, and I think that we should
accept the library with its current feature set; however, I believe that
some changes should be made to the physical structure of the library in
order to make "you don't pay for what you don't use" statement correspond to
the reality. In particular, I would like to see public library headers to
have a finer granularity, one header per an advanced construct, i.e.
"boost/lambda/if.hpp", "boost/lambda/while.hpp", "boost/lambda/switch.hpp",
etc. Also, as Dave Abrahams has noted, it would be nice if the core library
and all of the add-ons were better distinguished from one-another in the

4) Interaction with Boost.Function library; this issue hasn't been resolved
during the review, although a question about whether it should be done has
been raised. Currently, in order to assign a lambda expression to a
'boost::function<..>' object you have to do wrap it into 'unlambda' call,
which is unintuitive and awkward (IMO 'unlambda' is an unfortunate name). I
think we should strive for better interaction between these two libraries,
and I suggest the authors of LL and Boost.Function work out this issue
together before the LL public release.

5) Identity operation/difference between 'var'/'ref'/'constant'; I think
that the following two comments by Martin Weiser should be addressed:

"* Writing the identity as 0, _1 instead of _1 comes unexpected. Thus
either placeholders should be full fledged lambda functors, or a design
rationale why this is not the case should be given in section 5.1 of the

* I was somewhat irritated about the difference between ref/cref and var
for delayed access to external variables. This should be explained in
more detail."

I believe that most of the other technical comments/concerns were resolved
by the authors during the review. (Please speak up if I missed something

In conclusion, I would like to add that, I think, we all are looking forward
to the next LL/Phoenix merged revision of the library - the work that has
been sparkled by this very review, - and I hope that somehow the Bind
library will have its place there too (even if it means that the current
version is going to be declared obsolete :).

Once more, thanks to all reviewers who contributed their comments, and to
Jaakko and Gary for their great library!


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