From: Paul A. Bristow (boost_at_[hidden])
Date: 2004-01-09 07:30:35
I strongly agree with the requirement for explicit conversion.
It is just the Right Thing To Do.
It documents conversion and it reduces errors.
And at marginal extra cost in these 'turbo-editor' days.
Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of J.F.K.
| Sent: Friday, January 09, 2004 7:09 AM
| To: boost_at_[hidden]
| Subject: [boost] physical-quantities (automatic conversions)
|| automatic conversions are important enough for units library,
| so I've start another thread.
| the solution proposed by Matthias Schabel and Deane Yang:
| 1) no automatic conversion (Rationale - it is error prone)
| code like this:
| L_cm = l1_cm + l2_m*cm_;
| ----- Original Message -----
| From: "Matthias Schabel" <boost_at_[hidden]>
| Newsgroups: gmane.comp.lib.boost.devel
| Sent: Friday, 09 January, 2004 04:54
| Subject: Re: Re: physical-quantities
| > These problems go away if you require explicit conversions. I know
| > Andy wants automagic conversions, but I still think that the costs far
| > outweigh the benefits for reasons like the above. In addition, the
| > more explicit the units are the less likely errors are to arise when
| > code is later cannibalized, rewritten, cut-n-pasted, etc... into
| > contexts for which it was not originally intended...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk