
Peter Dimov wrote:
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?
lambda::bind, yes. std::bind cannot be replaced. boost::bind, too, IMO cannot be replaced, not in a long time, due to, as you said below, it works on more compilers.
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.
I can definitely make sure that all those are supported. I supported the lambda tests in phoenix. I can do the same for boost::bind tests in phoenix.
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.
Sure. Just like what John Maddock did with TR1 tuples targetting Fuson.Tuples. That can be done.
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".
Except on broken compilers though. That's the main reason why I think boost.bind will be with us for a long time still.
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. :-)
It is a priority for Phoenix. I'll make sure that all boost::bind tests will pass. Thanks for your comments. All points noted. Regards, -- Joel de Guzman http://www.boostpro.com http://spirit.sf.net