Boost logo

Boost :

Subject: Re: [boost] [Review] Type Traits Extension by Frederic Bron - Review summary and decision
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2011-04-21 14:16:33

On Thu, Apr 21, 2011 at 10:29 AM, Stewart, Robert <Robert.Stewart_at_[hidden]>wrote:

> Joachim Faulhaber wrote:

> > You are stressing a tiny technical point, while I'd like to
> > look at the big picture.
> I'm stressing that the purpose of the functors is to encapsulate the
> operation. The purpose of the traits is to determine whether the operation
> is applicable in a particular context. Since they do different things, have
> different semantic purposes, they don't need the same names.

FWIW, I agree with Joachim on this point. Since they both deal with builtin
C++ operators (something in common), *it would be nice* if the part of the
name referring to the operator (the common part) were the same (or a
slightly varied). The semantic difference between the functor and the trait
should, IMO, primarily be conveyed by the prefix or suffix or the particular
variation on the "primary" operator name.

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. I can sympathize with arguments against
"has_xxx" / for "can_call_xxx", I just never thought they were convincing
enough :/

The decision is ultimately Mr. Bron's, though, and I'm sure he's doing his
best to try to please everyone :)

My 2c,

- Jeff

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