Concerning Time.TimeDiff

Alastair Reid
Fri, 20 Jun 2003 06:08:22 +0100

> in any case, since a pair of Int64's is not a clear win and an Integer
> definatly is a clear win in terms of usability then I believe we should
> go for that.

It's a radical idea but... Maybe we could avoid all these issues by using an 
abstract type with all sensible instances (including Num though it is only 
semi-sensible for times).

Internally, we might use Integer or two Int64s or we might even add Int128 to 
our compilers.  Externally it looks like an Integral (or Fractional?) type.

Programs which perform a lot of time operations will use time operations which 
are implemented to exploit the fast internal representation.  Programs which 
convert times to/from Integer (or Rational) will play a small penalty but why 
would they be making these conversions?

Alastair Reid