|
Boost : |
From: Alexander Grund (alexander.grund_at_[hidden])
Date: 2021-01-06 08:47:03
> I absolutely agree with you on the importance of the naming conventions, and if it ever comes to the point where the library is considered for integration into Boost, I fully expect that a lot of renames will be necessary to make it consistent with the other parts. I have not considered this code to be in a position where other C++ programmers would look at it as an example, so I just used the STL naming style as a reference when I was deciding on the names.
Just an advice here: Don't use the full STL naming style as a guide,
even in hobby projects. The STL is part of the compiler "environment"
and hence is allowed to do things which you as "user of C++" are not.
E.g. the STL purposely uses "uglified" names such as `__iterator`
because no user of that STL is allowed to use that name.
And this isn't just about naming conventions: Using reserved names (i.e.
some names starting with underscore) is outright UB in C++ and hence
mustn't be used. The easiest way to avoid that is to not start using
names with underscores at the start. Also for a library there is no need
to "uglify" its names which makes reading, understanding and using it
easier.
If you want to use STL naming style (you can use the Boost one too which
is similar enough) then drop the leading underscores (so basically stick
to snake_case)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk