From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA06962 for caml-red; Wed, 5 Jul 2000 23:28:10 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA26898 for ; Wed, 5 Jul 2000 04:37:28 +0200 (MET DST) Received: from dynabook.is.s.u-tokyo.ac.jp (esumii-dsl-gw.dca.net [216.158.25.176]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e652bRH13915 for ; Wed, 5 Jul 2000 04:37:27 +0200 (MET DST) Received: from localhost ([127.0.0.1]) by dynabook.is.s.u-tokyo.ac.jp with esmtp (Exim 3.12 #1 (Debian)) id 139f3l-0000Ma-00; Tue, 04 Jul 2000 22:37:09 -0400 To: garrigue@kurims.kyoto-u.ac.jp Cc: sumii@saul.cis.upenn.edu, caml-list@inria.fr Subject: Re: polymorphic equality and overloading In-Reply-To: <20000705101152P.garrigue@kurims.kyoto-u.ac.jp> References: <20000704084224R.sumii@saul.cis.upenn.edu> <20000705101152P.garrigue@kurims.kyoto-u.ac.jp> X-Mailer: Mew version 1.94.1 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000704223709A.sumii@saul.cis.upenn.edu> Date: Tue, 04 Jul 2000 22:37:09 -0400 From: Eijiro Sumii X-Dispatcher: imput version 991025(IM133) Sender: weis@pauillac.inria.fr Hi Jacques (and Camlers), > The point I was trying to make is just that Ocaml, to avoid > complications in the type system, only allows universal overloading, That's clear, I believe, and my question was "why overload the (in)equalities". > I think hashing and marshalling will not bother you: No, they don't. > Comparison may not be always the one you expect, but in practice > this is enough to define efficient sets and maps. I'm not sure why it is "enough in practice", for... > you will have to define you own comparison if you need something > coarser this reason, but I agree that it has some uses as you wrote. > Haskell's solution may seem more intuitive, but it uses a much more > complex type system, and puts the burden of writing comparisons on the > user. I agree. By the way, I myself am not a Haskell devotee---I just have a friend who has chosen Haskell over Caml because of the issues on overloading. I hope to see what he says after he finish the "Gentle Introduction to Haskell" tutorial.:-) So, to summarize everyone's replies, the polymorphic (in)equalities exist because they are of "some" use, though they might be somewhat confusing---Is this correct? Eijiro