
2011/3/21 Dave Abrahams <dave@boostpro.com>:
On Mon, Mar 21, 2011 at 6:10 AM, Robert Jones <robertgbjones@gmail.com> wrote:
On Mar 21, 2011, at 4:52 AM, Max Sobolev wrote:
On 21.03.2011 13:43, Joachim Faulhaber wrote:
(1) Template parameter Identifiers are lower case except for the first
letter. This is official boost policy. Only BOOST_MACROS are
completely upper case. So:
template<class Left, class Right, class Result> instead of template<class LHS, class RHS, class RET> Abbrs. are dscrgd. ;)
agree.
I /hate/ lhs/rhs identifiers :( (despite my respect to people that use it (Scott Meyers etc.) :))
How curious... despite all their demonstrable short comings (similarity, redundancy, etc), I think that pair of identifiers are some of the best, most instantly recognisable and understandable identifiers ever coined!
+1.
Each to their own I guess.
I would go further: it's a mistake to break with a well-established convention that works just on principle. The chance that your alternative will work better in practice is extremely low.
My original point was not about lhs/rhs love or hate but about boost naming conventions on template parameters, which I think are well established in boost libraries. This from http://www.boost.org/development/requirements.html#Naming_consistency Use the naming conventions of the C++ Standard Library (See Naming conventions rationale): * Names (except as noted below) should be all lowercase, with words separated by underscores. * Template parameter names begin with an uppercase letter. * Macro (gasp!) names all uppercase and begin with BOOST_. As for LHS/RHS usage as template parameters in current boost libraries a grep on trunk/boost shows 'LHS' is used on 5 lines 'Lhs' is used on 10 lines 'Left' is used on 297 lines The boost web page says in addition: * Once a library settles on a particular convention, a vast majority of stakeholders want that style to be consistently used. that's what I hope for ;) Regards, Joachim -- Interval Container Library [Boost.Icl] http://www.joachim-faulhaber.de