Changes between Version 4 and Version 5 of Guidelines/Naming/Operators
- Timestamp:
- Mar 20, 2011, 7:55:03 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Guidelines/Naming/Operators
v4 v5 1 1 = Operator Names = 2 2 3 This page has been created for the extention of Boost.TypeTraits by operator traits to ease an overview over existing naming of operators in the standards and boost libraries. The purpose of the page is to collect differences and support convergence.3 This page has been created on occasion of the extension of Boost.TypeTraits by operator traits to give an overview over existing naming of operators in the standards and boost libraries. The purpose of the page is to collect differences and support convergence. 4 4 5 5 ||=Column =||=Comment =|| 6 ||= `op`=||The operator sign||7 ||= `alt`=||An alternative tokens, if available ||6 ||=op =||The operator sign|| 7 ||=alt =||An alternative tokens, if available || 8 8 ||=type_traits =||boost::type_traits naming as proposed by Frédéric Bron. || 9 9 ||=MPU =||Most Unifying Proposal || … … 14 14 ||=operator =||Corresponding naming of concepts from boost::operator || 15 15 16 The names in column MPU are trying to minimize the differences between and so maximize the consistency. The naming from Boost.Proto is found in other boost libraries, e.g. accumulator.16 The names in column MPU are trying to minimize the differences between names and maximize the naming consistency. The naming from Boost.Proto is found in other boost libraries, e.g. accumulator and phoenix. 17 17 18 ||= `op` =||=`alt`=||= type_traits =||= MUP =||= std =||= proto =||= boost::operator =||18 ||=op =||=alt =||= type_traits =||= MUP =||= std =||= proto =||= boost::operator =|| 19 19 ||=`==` =||= =||equal_to ||equal_to || `=` || `=` ||equality_comparable || 20 20 ||=`!=` =||=`not_eq` =||not_equal_to ||not_equal_to || `=` || `=` || || … … 56 56 57 57 58 There are some conflicts that have been solved under these rationals: 58 There are some conflicts that have been solved under these rationals. 59 60 An name is chosen along these priorities 61 1. If the name exists in the current c++ standard. 62 2. If the name exists in the new upcoming c++ standard. 63 3. Name is not given by 1 or 2 but is used in proto 64 4. For the remaining conflicts 65 a. Does the name follow general boost naming conventions? 66 b. Can it be completed to a typical concept name "conceptified". E.g. left_shift -> left_shiftable 59 67 60 68 ||`o=` || op_equal vs. op_assign || proto and other boost::libs agree on `op_assign`. We can better conceptify to OpAssignable || … … 63 71 ||`++ --` || pre/postfix vs. pre/post || goes to pre_in/decrement post_in/decrement. Seems simpler and more natural. || 64 72 65 A higher naming consi tency could be reached, if the standard was changed for 3 names:73 A higher naming consistency could be reached, if the standard was changed for 3 names: 66 74 67 75 {{{ … … 73 81 }}} 74 82 75 In this case all the `bit` prefixes could be replaced by `bitwise` .83 In this case all the `bit` prefixes could be replaced by `bitwise`, so it would be consistent with all proto names referring to bitwise operations. Note that "20.8.7, bitwise operations" are all part of the new upcoming standard and could still be changed. 76 84