On Wed, Aug 13, 2014 at 1:46 AM, Garret Wassermann <gwas...@gmail.com> wrote: > A library that allows one to define new derived units in terms of > base units and register them with the library would be really cool. > it could be useful for anyone no matter how specialized the field, > rather than having to update the library itself every time someone > wants a new unit. > > I would also like to see a library that allows basic arithmetic with > these units. Perhaps overloaded operators to allow one to add or > multiply quantities and preserve the correct resulting units. > Being able to for example set a = 2 kg, and b = 9.8 m/s^2, > then type c = a * b and have the library know that > c has the unit of Newtons now (or at least, know how to combine > the units and show the resulting kg*m/s^2 and check that it is > equivalent to a newton). It will be useful > as a sanity check on my work, though I also see this being > useful for more educational oriented software.
There is what I consider a good design idea for such a library at http://www.stroustrup.com/Software-for-infrastructure.pdf written by someone that I think knows some stuff about C++. David E. Narvaez _______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel