Boost logo

Boost :

From: Dan W. (danw_at_[hidden])
Date: 2004-01-03 19:34:02

> But but but....I think the point I am trying to make (unsuccessfully) is
> that a properly designed units library should not actually define any
> units itself. The units should be created only by the user of the
> library. Then there should be libraries derived from the units library,
> like the physical dimensions library.
> I see nothing wrong with focusing on a particular use case when
> designing the library, but if you want a truly useful C++ library,
> you want to design its guts so that they can be used by the library
> user to define whatever units the user happens to need. I think it
> is an error for the library writer to try to predict what units
> the library user needs.

I second that, 100%. Physical dimensions are not a magical set, even if
they happen to map very well with known physical laws; so what? One
might want to invent a Virtual UN-Reality Engine that has a completely
different system of physical laws; where 'ectoplasmic density' is a
daily weather concern. Without even going that far, how does one
express UV-ratings, wind-chill factor, radiation or aminoacid balance in
SI units?

I'm sure someone might be able to workout an SI-units equivalent for
Roentgents, but if I use them in a program, I probably don't even care
how many ergs root wavelength per square cm per second + particle
momentum factor that is, since I'd probably be using Roengens in
isolation just to keep logs for the EPA or whatever, in which case all I
want is a float, not even a double, that merely doesn't accidentally
convert itself to a wind-chill factor.

Boost list run by bdawes at, gregod at, cpdaniel at, john at