nholthaus / units

a compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies.
http://nholthaus.github.io/units/
MIT License
952 stars 135 forks source link

Renaming `unit_conversion` #161

Open JohelEGP opened 6 years ago

JohelEGP commented 6 years ago

The similarity in naming of units::unit_conversion and units::unit, previously units::unit and units::unit_t, respectively, have caused havoc in the documentation, whether in the source's code or comments alike.

I suggest dropping the redundant unit_ in units::unit_conversion. If we use conversion or units::conversion, and Conversion in template parameters, it becomes clear what's being referred to. At least more clear in respect to avoiding confusion with units::unit.

Conversion is already in the vocabulary of the C++ community. Since the unit's Conversion template parameter would be used to describe just how units convert to other units, I don't think renaming unit_conversion to conversion would be a cause of significant confusion. But I do believe that there might be room for a better name.

nholthaus commented 6 years ago

yup. What a "unit" actually was changed quite a bit over the library development, leading to everything having essentially the same name. Now that the scope is more clear, I think this makes a lot of sense. Maybe conversion_factor is better than conversion?

JohelEGP commented 6 years ago

conversion_factor is the best name.