From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 10352BCAC for ; Sun, 15 May 2005 17:50:34 +0200 (CEST) Received: from ash25e.internode.on.net (ash25e.adl2.internode.on.net [203.16.214.182]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j4FFoVhI014053 for ; Sun, 15 May 2005 17:50:33 +0200 Received: from [192.168.1.200] (ppp22-114.lns2.syd3.internode.on.net [59.167.22.114]) by ash25e.internode.on.net (8.12.9/8.12.6) with ESMTP id j4FFoPRm058605; Mon, 16 May 2005 01:20:26 +0930 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] A nastier example From: skaller Reply-To: skaller@users.sourceforge.net To: Jon Harrop Cc: caml-list In-Reply-To: <200505142009.29177.jon@ffconsultancy.com> References: <200505142009.29177.jon@ffconsultancy.com> Content-Type: text/plain Organization: Message-Id: <1116172224.17482.1033.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 16 May 2005 01:50:24 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 42876FC7.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 sourceforge:01 trade-offs:01 pitfalls:01 ocaml:01 usefulness:01 glebe:01 061:98 wrote:01 equality:01 polymorphic:01 imho:01 define:01 nsw:01 snail:02 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: On Sun, 2005-05-15 at 05:09, Jon Harrop wrote: > I think everyone would agree that there are caveats here but this is a > question of trade-offs. So the question should be "how can we improve upon > the current implementation?". > There are many pitfalls associated with equality in OCaml but the existence of > polymorphic comparisons is easily justified by their usefulness, IMHO. Require the user to define the comparison, then provide a way to generate them 'memberwise' for products and sums. -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net