Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [Review] Type Traits Extension by Frederic Bron - Review summary and decision
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2011-03-30 07:30:43


Daniel Herring wrote:
>
> Here are some brainstormed names. I
> reduced "operator" to "op" for uniform brevity.
>
> assert_op_equal_to

-1

There's no assertion.

> affirm_op_equal_to
> confirm_op_equal_to

-1

The use is to enable/disable compilation in most cases. No
affirmation or confirmation of anything occurs.

> can_call_op_equal_to

+1

Better without the "op_" part.

> check_op_equal_to

-1

Shorter than "can_call" but doesn't connote the right idea to me.

> detect_op_equal_to
> find_op_equal_to
> probe_op_equal_to

-1

Detecting/finding/probing isn't the same as ascertaining whether it is possible to call the operator.

> has_op_equal_to // implies the operator belongs to a class..

Agreed. Membership isn't the question.

> have_op_equal_to // better form of the verb

"Has" works fine if you consider the question to be whether the pair of types, used in an expression, supports the operator. However, this still has the membership connotation.

> test_op_equal_to

-1

This isn't far from being acceptable, but the "test" prefix is too general to be meaningful.

> trait_op_equal_to

-1

Meaningless.

> verify_op_equal_to

-1

This is better than "test" but still too general.

> Reducing underscore counts is good for the fingers. Here are a few

+1

> options there. I picked "check" for uniformity. Most of the
> prefixes above would also work.
>
> check_op_equal_to // base X_op_Y form
>
> check_opequal_to
> opcheck_equal_to
> checkop_equal_to
> check::op_equal_to
> check_op::equal_to

-1

Namespaces have been rejected and the compressed form doesn't read as well and only saves a single underscore.

_____
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