Boost logo

Boost :

From: Simon Buchan (simon_at_[hidden])
Date: 2005-10-25 18:28:15

Paul A Bristow wrote:
> | -----Original Message-----
> | [mailto:boost-bounces_at_[hidden]] On Behalf Of Matt Calabrese
> | Sent: 21 October 2005 18:53
> | To: boost_at_[hidden]
> | Subject: Re: [boost] Interest in dimension/unit-checking library?
> |
> | On 10/21/05, Deane Yang <deane_yang_at_[hidden]> wrote:
> |
> | > But wouldn't it make sense to develop a core
> | dimensions/units library
> | > without any predefined dimensions in it and develop the SI
> | quantities
> | > library as a layer above that?
> |
> |
> | That's exactly what my library is. It's a general physical quantities
> | library with SI just also provided as a set of classifications and units
> | coupled with the library.
> I've read this discussion with renewed interest.
> This sounds like a good basis to work on, potentially meeting all the
> requirements from the feet-on-the-ground-SI group (almost certainly by far
                           ^ meters-on-the-ground ? :-D
> the largest) but not excluding the head-in-the-astronomicals group (whose
> distances overflow SI units!), nor excluding the monetarily-important
> finance groups, not to mention the ones we have yet to conceive.

Don't forget the particle/quantam guys! Their units under-flow SI
doubles! (Or at least loose some serious accuracy)
> I worry that the compile times and complexity will outstrip both hardware
> and compilers, but the only way to find out is to try it. So I would
> encourage Matt to continue his efforts in this direction.
A lot of time could be saved with good header design, I assume, but
there really is no way around some overhead. Maybe some sort of
explicit instatiation and static linking stategy (whether in user or
library) could help.

> Paul
> PS My gut instinct is to enforce explicit conversions - mainly as a matter
> of documenting intent, but I am just about persuaded that implicit can be
> OK, provided it is loseless.
> If we can have a way of highlighting when implicit conversion takes place,
> that could make everyone happier.
Implicit lossy conversions are the worst curse a library can inflict on
the user, IMAO. Lossless is better, but I am only comfortable with
promotions, I don't even like int to double very much (as it loses the
guarantee of integralness).
So yes, explicit only.

Try putting the line "-- " just before this, it marks this as a sig, so
it won't be quoted in a lot of agents (AFAIK):
> Paul A Bristow
> Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB
> Phone and SMS text +44 1539 561830, Mobile and SMS text +44 7714 330204
> mailto: pbristow_at_[hidden]

Boost list run by bdawes at, gregod at, cpdaniel at, john at