Boost logo

Boost :

Subject: Re: [boost] Removing Bind placeholders from the global namespace
From: Sohail Somani (sohail_at_[hidden])
Date: 2009-06-14 16:50:47


Peter Dimov wrote:
> Sohail Somani:
>> If the boost::placeholders namespace was to exist, I was suggesting that
>> boost standardize on the placeholders in that namespace.
>
> OK, but what does this mean in the short term? What shoud we do with the
> immediate problem of bind's global placeholders?

I'd suggest a less "global" namespace to put them into.
boost::bindns::placeholders ?

>> This way, one can add "using namespace boost::placeholders" where there
>> is a lot of binding going on and not worry about whether they should be
>> using lambda's _1 or bind's _1 or phoenix arg1 or whatever else there is
>> now.
>
> This is unlikely. First, Lambda will probably not be converted to use
> placeholders other than its own. Second, once you have several competing
> libraries, you have to decide on the type of _1 + 1; it can't return
> both a Phoenix expression and a Lambda expression unless Phoenix
> expressions and Lambda expressions are interchangeable, in which case
> you basically have one library.

I think by standardizing on proto, you have one representation but you
could still have multiple implementations. Someone can correct me if I
am wrong, which occurs often enough :-)

-- 
Sohail Somani
http://uint32t.blogspot.com

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