Yet another point: there are plenty of non-obvious reductions that people worry about, such as "N m" -> "J" (energy) but "m N" -> "m N" (torque); but
it's probably not worth worrying about such things: if the coder knows that s/he wants a torque, s/he should be able to ask for reduction to a particular
form [e.g. 'units( $val, $template )' should exist and return $val in whatever units $template has, if possible.]
Oh, and don't underestimate the usefulness of doing things in non-base-ten mixed units, and useful fractions: my height is 5`ft+(6+1/4)`in, not 66.25`in, thank you.
In any case, I'd love something like this, and I suspect many other people would as well... but remember, again, extensibility is key.
C< $d=22`AWG; $a=pi*($d/2)**2; print $a`mm**2." qm"; # buying wire in Germany> doesn't work very well if there is no way to specify insane units like AWG.
25`USD*1.06+5`EUR can't be computed at all without extensibility, because the conversion rate from USD to EUR doesn't stay static over time. For that matter, monetary conversions are going to take some effort to get right, though they will be very useful if they are gotten right, because going through a common intermediary isn't correct. You won't get the same results converting USD to EUR to JPY as you will from converting USD to JPY. (OTOH, if you want to convert from DEM to FRF, you /must/ convert to EUR in the middle, or you will get the wrong result. Of course, neither the DEM nor the FRF have existed in several years, so it probably isn't that important...)
-=- James Mastros, Who certainly looks forward to this.