Boost logo

Boost Users :

From: David Walthall (walthall_at_[hidden])
Date: 2006-06-05 12:58:42

fred bertsch wrote:
> The review of Andy Little's Physical Quantities System begins today,
> May 31, 2006, and continues through June 9, 2006.

Hello Boost users,

Here is my review of the Physical Quantities System library.

> Please always explicitly state in your review, whether you think the
> library should be accepted into Boost.

I'll start by saying that I think that this library should be accepted
into Boost. It fills a major gap in the existing C++ framework for
scientific computing by bringing much needed type-checking for physical
units. I've been looking for a library that does exactly what PQS does
ever since I ran across the Dimensional Analysis section of David
Abrahams and Aleksey Gurtovoy's book, C++ Template Metaprogramming.

> - What is your evaluation of the design?
> - What is your evaluation of the implementation?

The only thing lacking in the current implementation is the ability to
easily extend current types to include other units. Right now it
requires editing the main headers to include the new units. (Andy
Little and I have discussed some ways to alleviate this problem which, I
believe, he intends to implement in the next version of PQS after the
formal review is completed.)

> - What is your evaluation of the documentation?

The documentation is solid and provides the reader with a thorough
understanding of the library. However, the library is simple enough to
use that just reading the Getting Started section was enough to let me
get started initially and test out the library to see if it did what I

> - What is your evaluation of the potential usefulness of the library?

This library is extremely useful for anyone who deals with values that
have associated units. As I mentioned before, a major short-coming of
C++ (and all other programming languages that I know of) is that values
are represented as dimensionless quantities, and it is the
responsibility of the programmer to ensure that all units are
consistent. This library removes that burden from the programmer and
places it on the compiler.

Using the PQS library also makes code self-documenting. All of the
variables which in C++ would have to carry their units in comments or
variable names can now carry all information in their type, which makes
it impossible to have the comment and code get out of sync.

> - Did you try to use the library? With what compiler? Did you have
> any problems?

I used the PQS library to add dimensions (and type-checking) to an
existing program that was about 20,000 lines. The process took less
than two days total. The process of converting from doubles to
dimensioned quantities uncovered a handful of bugs that would have
otherwise gone unnoticed, such as comparing a length to an area.

I used PQS with MS Visual C++ 7.1 on Windows XP and with gcc 4.0.1 under
OS X Tiger. I had no problems with either one.

> - How much effort did you put into your evaluation? A glance? A quick
> reading? In-depth study?

I would say that I have put considerable time into the evaluation of the
usability of this library. I have put only some time into understanding
the design and implementation - just enough to be able to use the
library and modify it when needed to add my own units.

> - Are you knowledgeable about the problem domain?

I believe that I am knowledgeable about the program domain. I received
a Ph.D. in Chemistry and now work as a scientific programmer.

Thank you,
David Walthall

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at