From: Deane Yang (deane_yang_at_[hidden])
Date: 2003-12-19 11:14:59
Paul A. Bristow wrote:
> | As it stands now, radians do not appear in the dimensional analysis
> | code, only in the implementation of the SI unit system.
> Which leaves users free to chose a mathematical view that angles are always pure
> numbers (with units of radians!),
I agree. I think some of the examples that were
characterized as being "u***" and (I forget the
other forbidden adjective) were unfortunate,
because they exaggerated the "problem".
I think it is possible to write good, clean
code, where sometimes radians are represented
using the units library and sometimes represented
as pure doubles. The point is that the two parts
should be clearly separated. If this is done,
then the u*** code should never be needed.
By the way, this discussion is also somewhat relevant
in the financial area, where percentages are ubiquitous
and suffer from the same kind of difficulty, because
a percentage is of course a pure number yet is often
used as a "unit".
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk