Re: Storing units in the database
Date: Tue, 12 Jul 2005 21:47:22 +0100
Message-ID: <11d8at8qkp11u25_at_corp.supernews.com>
Marshall Spight wrote:
> I believe that C++, for example, has everything you need to
> be able to do this sort of thing in the type system.
See e.g.
http://www.awprofessional.com/articles/article.asp?p=375705&seqNum=1,
which describes a framework for enforcing dimensional correctness;
extension to handle automatic units declaration and conversion is not
too hard (the hardest part is probably that a naive implementation will
have lots of rounding error -- probably want to implement it using
rationals rather than floating point).
> I am not aware, however, of any body of people finding it to be
> worth the effort.
The Ariane-5 software designers (and budget holders) might have been glad of it...
Misha Received on Tue Jul 12 2005 - 22:47:22 CEST