|
Boost : |
From: Jan Langer (jan_at_[hidden])
Date: 2003-10-16 02:39:06
Brock Peabody wrote:
>>>If I understand it like I think I do, it would matter what system you
>>>used,
>
> Oops, this should read "it would _not_ matter"! By which I meant that I
> though this library was totally ignorant of systems of measurement in
> general.
ok.
>>ok, the pseudo-code got a little out of hand. but i just dont understand
>>the confusion here. there are of course a lot of problems like type
>>promotion, fractional dimensions and so on but everyone who needs a
>>different unit system can build it on top of either dimensions, physics
>>or special units.
>
> Your pseudo-code was interesting, and I agree - this library doesn't need to
> answer all of these questions, but could serve as a foundation for others
> that will. I was just thinking out loud about handling conversions between
> different systems of measurement automatically.
i think its really impossible, because you can't know what conversions
will be needed in a specific system. and if a user needs its own system
(like the gasoline thing beman mentioned), he needs to rewrite nearly
everything from scratch. the library can only provide some tools to
define dimensions and conversions and so on in a shorter way.
jan
-- jan langer ... jan_at_[hidden] "pi ist genau drei"
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk