Boost logo

Boost :

Subject: Re: [boost] [units] problems
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2013-09-16 12:33:07


> -----Original Message-----
> From: Boost [mailto:boost-bounces_at_[hidden]] On Behalf Of Robert Ramey
> Sent: Friday, September 13, 2013 9:55 PM
> To: boost_at_[hidden]
> Subject: [boost] [units] problems
>
> I want and need the boost.units functionality. I'm sure that this is what I want. But I've spend
a lot of
> time going through the documentation and I'm having real difficulties figure out how to use this.
There's
> a lot there so I feel that what I want must be in there somewhere. I've started going through the
tutorial
> example and there are a couple of problems. First of all, it doesn't compile on my machine.
Looking at
> the tutorial, it actually contains two programs - one of which is commented out. I tried the
commented
> out one as well - it didn't compile either. Note that other than in the header, there are very few
if any
> comments in this code.
> So I'm interest in figuring out how to fix this but the manual doesn't seem to help me. I know a
huge
> amount of effort has been invested in this package, but I'm afraid this issue of documentation is
a big
> obstacle to this package being used every where it could be.
>
> Note to authors of boost libraries. When you think you've got the documentation done, hand it to
> someone who isn't familiar with it and ask him to make a small example using the library in 30
minutes.
> If he can't do that, it's time to go back to work. Most users will give up if they can't get some
sort of
> love back from the library in that amount of time.

I've had good results using Boost.Units - after much puzzlement and frustration.

I think there are several problems (at least).

1 Units are complicated - very, very complicated. Even if we could ditch Imperial and US units,
the fundamental weight in kg makes trouble. There are many conversions that are essential for the
thing to be useful.

2 Implementing them in C++ using templates to avoid any runtime cost proved to need concerted
efforts from the best brains we have. The whole idea is secure conversion, so explicitness is vital
- but annoying and puzzling.

3 The examples are quite good - but pack a lot (probably too much) into a small space.

4 The C++ Reference documentation (as you observe) lacks the vital info about what all the template
and other parameters do (pretty much Concepts by another name). This needs a lot of Doxygen
comments and is a massive and tedious task - especially as many of these are not trivial and need to
be quite detailed with notes and links to examples.

5 After the years of struggle to get it working, I can appreciate that the authors are very tired.
And there are other juicy challenges ...

I believe that someone else should write a bigger set of smaller examples (also drawing on the many
replies to cries of help) and use these as Quickbook snippets. With better documentation and
examples, I think this brilliant package might get the full use it deserves.

But I don't think that I am volunteering!

Paul

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk