mp-units icon indicating copy to clipboard operation
mp-units copied to clipboard

Rename `zeroth_xxx` origins

Open mpusz opened this issue 1 year ago • 8 comments

I am not a native English speaker, and zeroth felt strange to me from the beginning. When I present the library, most people in the room also complain about this name.

So far, we have:

  • zeroth_point_origin
  • zeroth_degree_Celsius
  • zeroth_degree_Fahrenheit

We need better ones.

mpusz avatar Dec 05 '24 06:12 mpusz

At the start, I recommended something like "implicit" or "implied", which may not be a "zeroth". Indeed, if a user writes quantity_point{1 * x} without reading the documentation, they might be expenting some other kind of implied default origin. Can you recavate the actual term I used? This, of course, means, that other values of such points might not be compatible (like quantities with equal dimension that are actually not of the same kind in unit libraries that don't implement quantities and their kinds), as their actual origin is not in the type system, unlike the current zeroth.

JohelEGP avatar Dec 05 '24 12:12 JohelEGP

A non-exclusive alternative would be to have another construction helper. A refinement of point<x>, zeroth<x>, which implies the default zeroth value of an x.

JohelEGP avatar Dec 05 '24 12:12 JohelEGP

In fact, why not encourage the user of ADL with the construction helpers? That makes them less noisy to use. We can then ban quantity_point{1 * x}, and require either 1 * point(x) (for some point), or 1 * zeroth(x) (for some/the implicit zeroth), and easily let users write their own, which for their own program-defined point origins will work with ADL.

JohelEGP avatar Dec 05 '24 12:12 JohelEGP

The negative feedback was mostly about the word "zeroth" itself. Most people proposed to rename it to "zero" (e.g., zero_point_origin or zero_degree_Celsius).

mpusz avatar Dec 05 '24 14:12 mpusz

Is zero_point_origin a pleonasm? Wouldn't origin<QuantitySpec> or zero_point<QuantitySpec> do the job? I probably don't understand what it's all about again :-).

Spammed avatar Dec 05 '24 15:12 Spammed

The negative feedback was mostly about the word "zeroth" itself. Most people proposed to rename it to "zero" (e.g., zero_point_origin or zero_degree_Celsius).

Well, there's nothing ordinal about "zero". "Zero point" seems like bad grammar, and not like the "point" makes the "zero" an ordinal, at least the way I see it.

"Point zero" seems better, but is that zeroth? Is "point one" first? "Point two" second?

The reverse for the current "zeroth point" would be "first point" and "second point".

If we take the suggestion of just replacing with "zero", that'd also be "one point" and "two point". Does that feel right?

JohelEGP avatar Dec 05 '24 21:12 JohelEGP

that'd also be "one point" and "two point"

In German, 'Nullpunkt' is the point at which the scale has the value 0.0. leo.org translates 'Nullpunkt' into English as 'zero', 'zero point' or 'origin' etc. Nobody would think of continuing with 'Einspunkt', 'Zweipunkt'.

Spammed avatar Dec 06 '24 07:12 Spammed

Nobody would think of continuing with 'Einspunkt', 'Zweipunkt'.

Yeah, zero alone might be the exception.

JohelEGP avatar Dec 06 '24 09:12 JohelEGP