
11 Feb
2007
11 Feb
'07
3:49 a.m.
If you think about it, you begin to realize that in *all* code involving arithmetic calculations (not just in physics or finance), you should wrap virtually every double with a type and define allowable operations using those types. This would catch a lot of errors at compile time.
My experience with implementing "simple" dimensional analysis has taught me one thing very clearly - rendering problems down to the right level of abstraction is very difficult, especially when constrained by practical realities of something concrete like a programming language. Matthias