|
Boost : |
From: Paul A Bristow (pbristow_at_[hidden])
Date: 2005-10-26 03:45:51
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]] On Behalf Of Simon Buchan
| Sent: 26 October 2005 00:28
| To: boost_at_[hidden]
| Subject: Re: [boost] Interest in dimension/unit-checking library?
| >...
| not to mention the ones *I* had 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.
Some VERY fancy meta-coding is required but the compile time effect on
real-life projects remains difficult to predict.
| > 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.
We are talking about implicit conversions from feet to meters here - almost
certainly lossless. You need to read Matt's quite complicated arguments for
these.
| 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] www.hetp.u-net.com
Does this please you better?
-- 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] www.hetp.u-net.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk