From: Andy Little (andy_at_[hidden])
Date: 2004-01-19 13:38:57
"Daryle Walker" <darylew_at_[hidden]> wrote
> I think a previous post ("Re: [boost] Re: Units libraries... (long reply)"
> by Phil Richards) gave me the impression that the poster thought
> should get special treatment within an unit/dimension library. I don't
> think it should.
[temperature info snip]
I would kind of like to second that. My approach to designing my
physical-quantities type has been to restrict what it tries to do to the
minimum. The three aims are restricted to:
1) Aiding legibility of code.
2) Disallowing dimensionally incorrect programs
3) Providing scaling between units within a quantity.
Issues that provoke a lot of debate are the kind of things where I feel that
the programmer would prefer to be left to use their own initiative. As time
goes by, If a library gets serious use then some problems will emerge.
Programmers are usually pretty good at finding solutions, so I would tend to
prefer to wait for a problem to surface in use before trying to fix it. On a
poetic note, a type is a word, in the paragraph which is the source-file, in
the book which is the program. IOW the programmer provides the context
One problem that is as old as the hills is provision for the realities of
numerics (e.g safe numeric/value_type conversions). Any information and/or
examples (and problems found) of how anyone else has gone about this in
their own user-defined-numeric-types (UDNT ?) libraries would be much
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk