
"Phil Richards" <news@derived-software.ltd.uk> wrote in message news:20050130142206.305CF5C14@derisoft.derived-software.demon.co.uk...
On 2005-01-30, Andy Little <andy@servocomm.freeserve.co.uk> wrote:
"Phil Richards" <news@derived-software.ltd.uk> wrote in message news:20050129141037.DE6D0E305@derisoft.derived-software.demon.co.uk... [wrt dimensional analysis being independent from units]
Indeed it does. I use one every day... we don't care about unit conversions because we don't do any. I would hope that a general purpose physical quantities lib would deal with units, even if you dont use anything but the base units. The Mars lander crash and all that. IOW you need to be explicit about what units you are using.
Yes, but I think what is being raised is that a "physical quantities library" and a "dimensional analysis library" don't have to be the same thing. The latter is a much simpler proposition, and, for many people is all that they want.
Strictly speaking dimensional-analysis is only used for checking (what I have called) 'abstract quantities'. As soon as a value is involved you need units in order to decipher what the value means. Therefore IMO a dimensional analysis type should not have a Runtime 'value' member and should be limited to compile time only. Then the dimensional analysis part can certainly be separated out as a self contained module. The two requirements on it would be some form of compile time math operations and also ideally some useful error message scheme on invalid operations. One could then roll ones own physical-quantity with that as a building block as reqd I guess.
It's all we need because *all* our interfaces to the outside world are defined entirely in terms of SI units. We make unit conversion an SEP[*].
IOW you are a user node on a generic physical quantities hub ... Let pqs take the strain ... :-) [*] That somebody else is me I guess.. no problem. However I hear what you are saying re boost::dimensional_analysis. regards Andy Little