Boost logo

Boost :

Subject: Re: [boost] [naming] standard: bitwise operations in the new standard (20.8.7)
From: Christopher Jefferson (chris_at_[hidden])
Date: 2011-04-29 07:53:43


On 29 Apr 2011, at 12:37, Joachim Faulhaber wrote:

> Dear list,
>
> this posting is addressed specifically to those people who are
> involved in the standardisation process for c++. As far as I know
>
> Beman, Howard, Dave, Doug, ...
>
> On occasion of the Boost.TypeTraits extension we were discussing names
> for operators and operator call traits. As an important aspect, naming
> consistency with the standard and across boost libraries has been
> discussed.

Unfortunately, you are a couple of months too late, the final version of the standard has been completed. You could submit a defect report, but I shouldn't think something would be renamed under a defect report, unless there was a good reason for doing so, and being compatible with boost probably isn't a good enough reason.

bit_and and friends have been in g++ since 2007, so it's really too late to be changing the name now.

Sorry,

Chris

>
> We have found that functors on bitwise operators
>
> // 20.8.7, bitwise operations:
> template <class T> struct bit_and;
> template <class T> struct bit_or;
> template <class T> struct bit_xor;
>
> are new in the upcoming standard and are named using prefix
>
> bit_
>
> In contrast to that, within boost, entities referring to bitwise
> operators are almost consistently named using prefix
>
> bitwise_
>
> This is done specifically in Boost.Proto but also Boost.MPI
> (boost/mpi/operations.hpp).
>
> bitwise_and, bitwise_or, bitwise_xor
>
> are declared and used at 95 lines in Boost Libraries currently.
>
> Since 20.8.7, bitwise operations are *new* in the standard and naming
> consistency would be great for users, do you think there is a chance
> that those 3 names can be changed to
>
> bitwise_and, bitwise_or, bitwise_xor ?
>
> If so, is there anything that can be done to help the process. I'd
> volunteer to write a paper, if necessary.
>
> This might be a tiny issue, but since operators are at the core of any
> language, a consistent naming around them might be of great value on
> the long run.
>
> Best regards,
> Joachim
>
>
> --
> Interval Container Library [Boost.Icl]
> http://www.joachim-faulhaber.de
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost


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