Re: [boost] Boost Units library preview

-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Andy Little Sent: Wednesday, August 16, 2006 7:46 AM To: boost@lists.boost.org 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 latter approach. 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 devised AFAIK.) Eric.

"Eric Lemings" <lemings@roguewave.com> wrote in message news:D730FF7CEDDCA64483F9E99D999A158B42012A@qxvcexch01.ad.quovadx.com...
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Andy Little Sent: Wednesday, August 16, 2006 7:46 AM To: boost@lists.boost.org 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 latter approach.
Compare the library interface of Quan to my proposed design. I would be interested to know what you think.
I need more docs and at least to be able to run the code to form an opinion. Having an alternative view to Quan is healthy so I don't have a problem with it, but there is not enough detail there yet for me to get a good idea of where the proposed Boost.Units library is going. As far as the impled criticism (presumably) of Quan is concerned: re Boost.Units "The interface is probably quite different from anything previously seen but hopefully it is more intuitive, flexible, and...well...appealing. " That's quite a general criticism, but obviously there is not enough detail there either for me to be able to respond to it in any meaningful way. Quan is fairly close now to being a suitable candidate for another boost review. I am quite happy to have Quan and Boost.Units reviewed together, but OTOH as boost has been waiting for a library of this kind for at least 5 years, then we need to press on and not wait until Boost.Units is in a reviewable state. Obviously you have problems with Quan, else presumably you wouldnt have started work on an alternative. If there are fundamental problems with Quan then obviously I would be interested to know what they are, rather than having them brought up in a review... Of course as author of a rival library, then maybe that puts you in a difficult position?
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 devised AFAIK.)
OK so we can assume that Quan seems to have got at least one thing basically correct? regards Andy Little
participants (2)
-
Andy Little
-
Eric Lemings