On 05/02/2012 19:13, Phil Clayton wrote:
On 05/02/12 11:51, David Matthews wrote:
On 03/02/2012 15:44, Phil Clayton wrote:
It appears that Poly/ML overloads operators + - < <= >= > for Time.time but they shouldn't be, according to the Basis Library. http://www.standardml.org/Basis/top-level-chapter.html#section:3 Perhaps they were overloaded once upon a Time.time...
Yes, it looks as though strictly speaking you're right. It does seem strange, though, to have these operators and not include them in the overloading. I'm rather reluctant to remove the overloading but I appreciate as it stands it doesn't comply with the definition.
I discovered this when MLton rejected some existing code I had. SML/NJ also follows the Basis Library strictly too. I suppose the question is whether the potential portability problems outweigh the benefits.
Generally, I prefer to conform to the standards whenever possible but in this case I'm not convinced that it would be a good idea to change it. As an experiment I removed the overloading and had to make several changes to the rest of the library code to allow it to compile. Perhaps as a first step I'll ensure that the rest of the library will compile if the overloading is removed and then people can experiment with removing the overloads. They are just the last few lines of basis/Time.sml.
David