|
Boost : |
Subject: Re: [boost] Removing Bind placeholders from the global namespace
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-06-14 18:22:22
AMDG
Sohail Somani wrote:
> Since you asked, in my opinion, it is better because it doesn't give the
> wrong impression that these are *the* boost placeholders and all those
> other libraries deliberately don't use them to make my life miserable :-)
>
> Though, thinking about it a bit further, if you were to annex the
> boost::placeholders namespace for bind's placeholders, maybe the other
> library authors would support what is in that namespace with their
> libraries. <hand_waving>How hard can it be?</hand_waving> I guess only
> they know.
>
> I am just asking for some assurance that boost::placeholders would not
> just be placeholders that work with one library forever. I think that is
> unfair to the user. There are some really great Boost libraries that
> help you make your code more concise and it isn't a coincidence that
> placeholders have a big part to play in these libraries.
>
Given that boost::bind is also at the top level, I don't
see a problem with putting bind's placeholders in boost::placeholders.
It should only require a few template specializations to make
Lambda and Phoenix recognize them. The only issue is
that as Peter mentioned, _1 + _1 won't work.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk