Closed mpusz closed 2 hours ago
There should be a coherent pair of terms for 'quantity point' and 'quantity non-point', I think. But I think that's a slippery slope. Is the 'quantity non-point' a 'quantity vector' or a 'quantity distance' or what?
We have quantity
(constructed with delta
) and quantity_point
(constructed with absolute
). We've considered renaming quantity
to quantity_delta
, but that puts a lot of burden on many users with no good return as most users may not care about the affine space abstractions.
An alternative could be to rename the entire quantity. If we decide to put it to std::units
for C++29 maybe quantity
could be renamed to std::units::delta
and quantity_point
to std::units::point
, and with this, we could probably remove the construction helpers as the types themselves would be quite helpful to prevent errors. But std::delta
and std::point
are probably too generic.
+1 to replacing absolute
with point
. I think it's an overall better name.
-1 to replacing quantity
with delta
. I think it's an overall worse name.
I'm not bothered by the mild inconsistency between delta<Ref>(x)
making a quantity
, and point<Ref>(x)
making a quantity_point
.
We have
delta<Reference>(Number)
andabsolute<Reference>(Number)
construction helpers for a few months nowToday, however, I realized that a much better name than absolute might be
point
.For example, the code from https://mpusz.github.io/mp-units/latest/users_guide/framework_basics/the_affine_space/#point-is-modeled-by-quantity_point-and-pointorigin could be refactored to:
I think it better describes the intent (results with
quantity_point
) and the nature of this entity (absolute
is probably not the best name to describe this; I didn't even use it in a list at the beginning of https://mpusz.github.io/mp-units/latest/users_guide/framework_basics/the_affine_space/#the-affine-space)What do you think? Should we refactor
absolute
topoint
?