
On Wed, 2 Feb 2005 12:48:06 -0800, Robert Ramey <ramey@rrsd.com> wrote:
At first I didn't understand this. But upon a little reflection I think it is a very interesting idea. If Dimensional analysis were built on top of this, odd ball cases such as "nanovolts per sqrt(Hz)" could be handled as specializations of <T,X1> op <T,X2> while default dimensional analysis would be used it implement the default cases.
What made me start thinking along these lines wasn't sophisticated cases, but really primitive ones. The very simplest rule for <T,X1> op <T,X2> is that it's illegal unless X1 and X2 are the same, and that's actually useful. It means that an int or double that you're using for one purpose can't accidentally be mixed up with one you're using for another purpose. You don't want to add apples and oranges, but you probably don't want to multiply them either. --Matt