On Monday, September 30, 2013 01:42:25 PM Stefan Karpinski wrote:
> I also think that non-SI units
> should be strictly a matter of presentation – as in the actual
> representation of units should always use SI, but you can ask to convert it
> to some other form for presentation.
If all you're thinking about is computing with units, I agree. However, if
you're thinking about annotating with units, then somehow you need to store
the desired representation. Folks will not be thrilled if they specify that
they want a scalebar of size "10 microns" in their image, and the little
helpful text printed above the scalebar says "1e-4 meters".
So going the immutable route we need either of the following:
(A) Standardized immutable type for computation + Non-standardized type for
annotation
(B) Standardized immutable type for computation + A type that stores 2 of the
first type of object (the standardized value and the desired representation).
With the second version, you get the coefficient from uval/urepres, but you
still have the question of how you pretty-print the units value. So I think
(A) is better. That basically corresponds to merging Keno's (standardized) and
my (annotation) repositories, plus adding a converter between the two.
--Tim