[naming] standard: bitwise operations in the new standard (20.8.7)

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. 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

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

On Apr 29, 2011, at 7:53 AM, Christopher Jefferson wrote:
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
Agreed. Howard
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
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Howard Hinnant wrote:
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
On Apr 29, 2011, at 7:53 AM, Christopher Jefferson wrote: 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
Agreed.
Howard
[snip]
// 20.8.7, bitwise operations: template <class T> struct bit_and; template <class T> struct bit_or; template <class T> struct bit_xor;
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 ?
As a matter of fact, 'bitand' and 'bitor' have been alternative tokens for & and | since at least C++98. I.e. still no "bitwise" in the name. [snip]
Best regards, Joachim
Best Regards, Gevorg

2011/4/30 Gevorg Voskanyan <v_gevorg@yahoo.com>:
Howard Hinnant wrote:
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
On Apr 29, 2011, at 7:53 AM, Christopher Jefferson wrote: 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
Agreed.
Howard
[snip]
// 20.8.7, bitwise operations: template <class T> struct bit_and; template <class T> struct bit_or; template <class T> struct bit_xor;
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 ?
As a matter of fact, 'bitand' and 'bitor' have been alternative tokens for & and | since at least C++98. I.e. still no "bitwise" in the name.
I know that, but the alternative tokens seem to be somewhat special as they seem to be designed to be extra short (as direct alternatives for the short op-signs)... ... nevertheless, thank you all for the clarification of this point. Since we can not expect, much less enforce, a change in the standard to "bitwise_" prefix and consistency with the standard should of course have #1 priority for naming consistency, the Most Unifying Proposal for the operator name component as in https://svn.boost.org/trac/boost/wiki/Guidelines/Naming/Operators remains as proposed before. Best regards, Joachim -- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de
participants (4)
-
Christopher Jefferson
-
Gevorg Voskanyan
-
Howard Hinnant
-
Joachim Faulhaber