Boost logo

Boost :

Subject: [boost] phoenix::bind
From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-09-29 08:28:46


This is not a review, sorry.

Is it a goal of phoenix::bind to one day replace lambda::bind and
boost::bind, being a superset of both, as well of std::bind?

I have hoped for boost::lambda::bind to supercede boost::bind. It is a
common claim that the only advantage of boost::bind is that it works on more
compilers. But this isn't true. It supports constructs which lambda::bind
does not; using smart pointers with member functions, member functions of
abstract classes, proper const propagation, is_placeholder, _4.._9, and so
on. There were other differences (lack of result_type support...) for which
I was able to contribute patches to Lambda. But some of the differences are
systemic and can only be addressed by a maintainer.

Having two components named "bind" has always been a problem for our users.
Having three will not help. Ideally, all "bind"s ought to resolve (on a
supported compiler circa '08) to the same component.

When I heard that the next Phoenix (at the time this meant V2) was intended
to be the successor to both Phoenix 1 and Lambda, I thought that we were
about to finally have a single bind that "just works".

But - and sorry if this is not the case - I do not get the impression that
this is a high priority goal for V2. It'd be nice if I were mistaken; it
would be nicer still if phoenix::bind passed all boost::bind tests so that
we can just replace boost/bind.hpp with a single using declaration. :-)

To avoid any misunderstandings: this is not a review, and the above is not a
condition for acceptance.


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