Boost logo

Boost Users :

From: Andy Little (andy_at_[hidden])
Date: 2006-06-05 15:01:40

"David Walthall" <walthall_at_[hidden]> wrote in message
> 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.

Great! Thanks!

> 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.)

Absolutely. Thanks for coming up with the mechanism!

>> - 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
> needed.

Good. The Getting Started section was the most enjoyable part to write and
should probably be made easier to get at.

>> - 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.

That sounds very similar to the original use case for the library. Its nice to
have the confirmation from elsewhere that it does what its intended to.

> 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

Thanks for the taking the time to submit the review.

Andy Little

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