Re:Please put units in names
by ParetoOptimal on Tuesday March 22, 2022 @09:43PM
(#30773894)
> What about setSpeedMmps
Mmps would be confusing and frustrating the first time I think.
Mmps would be confusing and frustrating the first time I think.
But more important: there's middleground. What about setSpeedMmps() if setSpeedInMillimeterPerSecond is too noisy.
My ROT is that the unit or type designation schould not overshout the most important info. Which, in case of setSpeedInMillimeterPerSecond is arguably, indeed the case. But the solution is almost never binary, but a more succint version. Everyone understands km, mm, sec, hr (though the win with such is silly) px and so on.