units icon indicating copy to clipboard operation
units copied to clipboard

Renaming `unit_conversion`

Open JohelEGP opened this issue 5 years ago • 2 comments

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.

JohelEGP avatar Jul 18 '18 17:07 JohelEGP

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?

nholthaus avatar Jul 18 '18 19:07 nholthaus

conversion_factor is the best name.

JohelEGP avatar Jul 18 '18 20:07 JohelEGP