Boost logo

Boost :

Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
From: Lorenzo Caminiti (lorcaminiti_at_[hidden])
Date: 2012-08-20 14:43:51


On Mon, Aug 20, 2012 at 10:56 AM, Larry Evans <cppljevans_at_[hidden]> wrote:
> On 08/20/12 12:46, Eric Niebler wrote:
>> On 8/20/2012 10:39 AM, Nicholas Howe wrote:
>>> On Sun, Aug 19, 2012 at 3:48 AM, Alexander Lamaison <awl03_at_[hidden]>wrote:
>>>
>>>> Dave Abrahams <dave_at_[hidden]> writes:
>>>>
>>>>> on Thu Aug 09 2012, Robert Jones <robertgbjones-AT-gmail.com> wrote:
>>>>>
>>>>>> On Thu, Aug 9, 2012 at 4:44 PM, Paul A. Bristow
>>>>>> <pbristow_at_[hidden]>wrote:
>>>>>>
>>>>>>>> -----Original Message-----
>>>>>>>> From: boost-bounces_at_[hidden] [mailto:
>>>>>>> boost-bounces_at_[hidden]] On Behalf Of Steven
>>>>>>>> Watanabe
>>>>>>>> Sent: Thursday, August 09, 2012 3:52 PM
>>>>>>>> To: boost_at_[hidden]
>>>>>>>> Subject: Re: [boost] [type_erasure] Review started (July 18-27, 2012)
>>>>>>>>
>>>>>>>> AMDG
>>>>>>>>
>>>>>>>> On 08/09/2012 02:27 AM, Paul A. Bristow wrote:
>>>>>>>>>
>>>>>>>>> Should the unary plus be included for completeness?
>>>>>>>>>
>>>>>>>>
>>>>>>>> Sure. What should it be called?
>>>>>>>
>>>>>>> plusable
>>>>>>>
>>>>>>> perhaps?
>>>>>>>
>>>>>>> I can't think of any better.
>>>>>>>
>>>>>>>
>>>>>> unaryaddable maybe?
>>>>>
>>>>> I don't think unary plus can be considered an addition.
>>>>
>>>> Posatable (complement of negatable) ;)
>>>>
>>>>
>>> I like affirm as a name for unary operator +, because it's an antonym of
>>> negate, it can be made into other parts of speech similarly to negate, and
>>> because I think it conveys the general redundancy of using unary operator
>>> +. If you think of unary operator + as the affirmation operator, then you
>>> can use affirmable here.
>>
>> For an early version of Proto, I used "posit" (v. Assume as a fact; put
>> forward as a basis of argument.) as the name for the unary plus operator
>> for many of the same reasons you cite above. There was a hew and a cry
>> during Proto's review, and I had to change it to unary_plus.
>>
>> Just another data point.
>>
>
> I like unary_plus because it's so simple and immediately conveys
> what it means. One may object by saying plus is a binary operation,
> and prefixing it with unary is a contradiction, but then so is
> +1. But then that would suggest negatable be renamed to unary_minus.

The +a operator is called "unary plus" here
http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Arithmetic_operators
so /maybe/ unary_plusable...

HTH,
--Lorenzo


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