Boost logo

Boost Users :

Subject: Re: [Boost-users] [units] Automatic Physical Units in Mathematica and Boost.Units
From: Joel Falcou (joel.falcou_at_[hidden])
Date: 2010-12-24 04:25:48


On 24/12/10 05:13, Matthias Schabel wrote:
> Automatic conversion is a much-requested and highly contentious issue that
> we intentionally did not support in the library, making the decision after much
> careful consideration. It is difficult to do it correctly - in the situation where you
> have, e.g., mixed meters and feet :
>
> 1.5*meters + 3.7*feet
>
> either there must be a specified default set of units to which everything is converted
> or an arbitrary decision must be made by the compiler.
>
Just chiming in on this subject. Why not having a way to defines user
rules for conversion in some kind of conversion compile time strategy
and have a way to say: unit X and Z use this map please ? By default, to
preserve old code, let the library define a no_conversion policy ?

It dont add anything to the existing library but allow for a smooth
customisation point for users.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net