Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2004-01-09 21:35:55


"Dan W." <danw_at_[hidden]> writes:

> Matthias Schabel wrote:
>> Consider :
>> x meters + (y planck_length - z centimeters) ->
>> furlongs z =
>> proxy<op<plus,meters,op<minus,planck_length,centimeters> >
>> Do we convert y and z to meters, x and z to planck_lengths, or x and
>> y to centimeters before
>> the arithmetic and conversion to furlongs? The outcomes can be
>> different, as has been discussed earlier, due to precision issues.
>
> Exactly! I'd rather be forced to write a long expression one op at a
> time, writing partial results to named variables, using explicit
> conversions, each on a new line. It's more clear, and much easier to
> debug.

I think Walter Landry might have some counterexamples to that
assertion.
http://www.oonumerics.org/tmpw01/landry2.pdf

Being forced to do things one way may be fine for your domain, but it
could mean a critical loss of expressiveness for other domains.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk