
Steven Watanabe wrote:
How would you do it? Using some special set of units has problems with extensibility. Suppose someone tried to add currency and used US dollars as the base and at the same time someone else used euros as the base.
Currency is even worse than that. Currency exchange rates fluctuate at least daily so the conversion must be table driven so that it can be updated. Since this can't be just a compile time conversion it really doesn't fit well with the rest of the library. In fact its probably more correct to avoid thinking of currencies as a fundamental units since both their absolute value (i.e. purchasing power) and relative values don't have stable real-world meanings. OTOH, if everybody changed to a gold based standard then things might be different but there is probably a legion of economists yelling "no way in hell" at their screen right about now... -glenn