I once wrote a C++ template library that did exactly that.  Arbitrary units,
rational exponents -- you can have (m^(3/2)/kg^(5/16)) dimensioned value.
All at compile time, without runtime checking whatsoever.

Too bad it took eternity to compile a simplest program.

Things like that should be built-in right into the language, or at
least easy to implement.  It would be very nice if Haskell could
support this.

Hmmm...I think one can do it in Cayenne.  Any experts?


On Aug 26, 18:56, Tom Pledger wrote:
> Subject: Units of measure
> Hi.  Here's a short question which has been bothering me, and a longer
> discussion of why.  Apologies if it's a rote.
> 
> Where do units of measure fit into a type system?
> 
-- 
Anatoli Tubman <[EMAIL PROTECTED]> - opinions aren't


Reply via email to