Boost logo

Boost :

Subject: Re: [boost] [Review] Type Traits Extension by Frederic Bron - Review summary and decision
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-04-25 07:53:25


Jeffrey Lee Hellrung, Jr. wrote:
> On Thu, Apr 21, 2011 at 12:13 PM, Stewart, Robert
> <Robert.Stewart_at_[hidden]>wrote:
> > Jeffrey Lee Hellrung, Jr. wrote:
>
> > > Also, while we're on the topic of what *I* prefer: I still
> > > prefer "has_xxx". To me, it has an implicit association
> > > (to me, anyway) to the names of trait predicates; it has
> > > simplicity and brevity; and it has existing use in
> > > Boost.TypeTraits.
> >
> > What about all of the "is_" prefixed traits
>
> Those, too!

OK, so there are names in TypeTraits with both "has_" and "is_," so "has_" isn't the only prefix you should associate with the library. That was my point.

> > and other names in Boost.TypeTraits with prefixes like "add_"
> > and "remove_,"
>
> Those aren't predicates...
>
> > and those without a prefix?
>
> Such as...?

I was thinking of "existing use in Boost.TypeTraits" while forgetting "implicit association to the names of traits predicates" in what you wrote.

> > There's clear precedent for different prefixes for different
> > purposes within the library. Remember that "has_" implies
> > ownership or inherent characteristic which doesn't apply to a
> > namespace scope operator.
>
> Well, I don't think it's confusing to say that "A has a plus
> operator" is equivalent to "A + A is well-formed". Like I said,
> I understand that arguments against "has_xxx", but it's still
> more natural to me than "can_call_xxx".

That's a valid point in that case. However, don't forget that it can also be A + B, in which case the operator bridges two types and is, therefore, part of neither interface or else somehow part of both. "has_" doesn't work as nicely then.

_____
Rob Stewart robert.stewart_at_[hidden]
Software Engineer using std::disclaimer;
Dev Tools & Components
Susquehanna International Group, LLP http://www.sig.com

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.


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