mercredi 21 février 2018

Naming convention of own type traits

my question is about what is considered best practice when defining your own type traits concerning the naming of these. Should one follow the naming convention of the standard implemenation (lower case with ground dashes, e.g. is_type_trait_name) or better not?

The reason for this is that I am always following the naming convention of the standard for my own type traits. The thought behind it is that I would like to stay consistent so there is no break in how type traits look like and everyone can identify them as such (as they are already familiar with it from the standard implementation).

Having different looks for type trait definitions seems more confusing than helpful to me and if desired one could always define an alias template for it with a different naming scheme.

I understand that a reason for using a different naming scheme is of course that one can distinct them as one of your own but to me personally this does not outweigh the consistency one is used to from the standard implementation.

So I am interested in how other people are handling it and why!

Aucun commentaire:

Enregistrer un commentaire