Word32.word -> Int32.int

Stephen Weeks MLton@sourcelight.com
Tue, 29 May 2001 09:33:20 -0700


> Speaking of the horrible impossibility of dealing portably with int/word sizes,
> isn't it insane that Time.toSeconds and Time.fromSeconds use LargeInt.int?
> These times are Unix times, and that means 32 bit ints.  If they were not Unix
> times, then raising an exception in fromSeconds on a negative argument wouldn't
> be an error.  Mind you, it really shouldn't be an error and should just indicate
> a time before Jan 1, 1970.

The only reason I can think of is that they didn't want to use Int, because in
SML/NJ (and maybe other SMLs, I think), Int is Int31.  By using LargeInt, they
increase their chance of being able to represent Unix times.  I suppose they
could have used Int32, but they didn't want to force that on everybody.