From: Eric Lemings (lemings_at_[hidden])
Date: 2006-08-16 12:46:28
> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Andy Little
> Sent: Wednesday, August 16, 2006 7:46 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] Boost Units library preview
> Hi Eric,
> I'm not quite sure which way to take this. Does this mean
> that you consider the Quan UI unsatisfactory and beyond repair?
Well I'll put it this way. Let's say you have two library interface
designs. The first design, A, is the hypothetically perfect library
interface. The second design, B, is a tangible, real, albeit less
than perfect design. The goal of course is to get B as close as
possible to A. Now would it be easier to hack away at B or start
from scratch with a new design called C? I decided to take the
Compare the library interface of Quan to my proposed design. I
would be interested to know what you think.
> The implementation is loosely based on the dimensional
> analysis example in David Abrahams and Alexei Gurtovoys TMP
> book The implementation can be seen here:
That's a start but it's not a straight jacket. In addition to
seperating the concept of a 'quantity' from the concept of a
'measure', I wanted to allow the user to define dimensions and
units in a free-form manner using a type sequence of base
dimensions and units. The user can list the dimensions and
units of the sequence in any order.
> Tested in VC7.1 and VC8.0 of vthe two examples gave compile
> errors. Testing in gcc 4.0 gave a failed assertion at runtime
Like I said, it's a preview. I made it available in order to
get comments and feedback regarding the design of the interface.
It's not even close to being ready for real use.
> Is the structure of a unit / conversion factor based on that
> in quan?. It certainly looks very similar.
Yes, same approach. (Only solution to the problem that has been
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk