|
Boost : |
From: Michael Fawcett (michael.fawcett_at_[hidden])
Date: 2007-01-22 13:41:02
On 1/22/07, Noah Roberts <roberts.noah_at_[hidden]> wrote:
> You have a great library, something that might be a great backbone for a
> runtime units system and provide an extra level of safety, but I think
> the primary use to most people of a unit library is going to be runtime
> units you either need to support this directly or better document the
> methods to use your library for such purposes. 99.99% of the time users
> are going to stick with a single system, usually the SI system, as their
> static set of units and will need to do a lot of conversions into and
> out of these base units. I understand your desire to keep your library
> simple and to a single task and goal, but I just don't see much need out
> there for a library that does static unit conversions but has no concept
> of runtime units.
I think the majority of people who participated in Andy Little's
review and those who have responded to this thread disagree. We (I
include myself, and hopefully have interpreted others' responses
correctly) envision this being mostly a compile-time problem, with a
much smaller use-case for run-time support.
The purpose being to catch at compile-time errors that would have
before gone unnoticed, such as:
// returns feet!
double get_altitude_from_sensor();
// assumes meters!
bool should_deploy_chute(double altitude);
// Somewhere in another module
while (true)
{
double altitude = get_altitude_from_sensor();
if (should_deploy_chute(altitude))
break;
}
deploy_chute();
Sound familiar? ;)
I'd like to encourage Matthias in what looks like a very promising library!
--Michael Fawcett
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk