Boost logo

Boost :

Subject: Re: [boost] [TypeErasure]
From: Markus Werle (numerical.simulation_at_[hidden])
Date: 2012-07-23 14:17:43

Steven Watanabe wrote:


[*slightly* off-topic: Does that mean Ad maiorem Dei gloriam?]

> On 07/22/2012 07:21 AM, Markus Werle wrote:
>> Hi Steven!
>> I have one question: proto and spirit use _1, _2, etc.
>> TypeErasure uses _a, _b, _c ...
>> What was your reason to introduce yet another placeholder set?

I disagree with this decision. You write:

> An earlier version of the library used the names _1, _2, etc.
> instead of _a, _b, etc. This caused a certain amount of confusion
> because the numbered placeholders are already used by several
> other libraries including Boost/Std Bind, Boost.Phoenix, and Boost.MPL.

IMHO the introduction of another set of placeholders is more confusing.
If we are to discriminate here, we can do it via namespaces - and of course
one day it is std::_1 for all of us.

Just because your library is the first to use _a, _b, _c what does that mean
for future (boost) libraries that use some kind of placeholders?
Do they have to use _aa, _bb, etc.?
To me placeholders are such a natural concept I do not care about having
some kind of "deja vu" here. To the contrary: The meaning (placeholder) is
identical so we should use identical names.

> I eventually decided that since the placeholders represented named
> parameters instead of positional parameters, letters were more
> appropriate than numbers.

Indeed the naming is arbitrary. Starting from the same observation (_1 is
already available in boost::*) I draw the opposite conclusion:
Use these names for the sake of symmetry and hope for convergence of
concepts over the years.

@Review Master: Should I miss the end date for reviews, take this as my mini
subset of a review: I'd prefer _1, _2 instead of _a, _b.


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