From: Dave B. <da...@ta...> - 2001-09-18 07:39:41
|
At 14:20 17/09/2001, Matthias Blume wrote: >I agree with Bob and others who would rather drop polymorphic equality. One possibility would be to keep the notion of equality type, and to replace the polymorphic equality operation with a function overloaded on equality types. This would remove the notion of "equality type variable", and make the language more uniform. Daniel suggested the opposite approach: keeping polymorphic equality but getting rid of eqtypes (as in OCaml). I don't like this at all -- I think it's one of the weak points of OCaml. As far as I'm aware, if I define a set type using unsorted lists in OCaml, the equality operator compares the representation of two values. In SML I can use abstraction to make the type non-eqtype, which seems much preferable. OCaml's equality can even return different results when comparing floating point numbers (when NaN), depending on whether the compiler can deduce the types involved! To be honest, I doubt that changing the current definition is worthwhile, compared to other improvements we could be doing. Dave. |