From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id B2AD1BC50 for ; Sat, 16 Sep 2006 20:53:14 +0200 (CEST) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id k8GIrEC9014047 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 16 Sep 2006 20:53:14 +0200 Received: from ibm1.cicrp.jussieu.fr (ibm1.cicrp.jussieu.fr [134.157.15.1]) by shiva.jussieu.fr (8.13.7/jtpda-5.4) with ESMTP id k8GIrEU6076857 ; Sat, 16 Sep 2006 20:53:14 +0200 (CEST) X-Ids: 168 Received: from localhost (fernande@localhost) by ibm1.cicrp.jussieu.fr (8.8.8/jtpda-5.3.3) with ESMTP id UAA1503316 ; Sat, 16 Sep 2006 20:53:05 +0200 Date: Sat, 16 Sep 2006 20:53:05 +0200 (DST) From: Diego Olivier Fernandez Pons Reply-To: diego-olivier.fernandez-pons@cicrp.jussieu.fr To: caml-list@inria.fr Cc: rossberg@ps.uni-sb.de Subject: Improper generic equality in Caml (Rossberg's SML vs Caml) In-Reply-To: <20060913091435.537F4AC04@Adric.metnet.fnmoc.navy.mil> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (shiva.jussieu.fr [134.157.0.168]); Sat, 16 Sep 2006 20:53:14 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.2/1886/Sat Sep 16 12:39:23 2006 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at discorde with ID 450C481A.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at shiva.jussieu.fr with ID 450C481A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; pons:01 pons:01 improper:01 sml:01 rossberg:01 sml:01 rossberg:01 bool:01 bool:01 pervasives:01 equality:01 equality:01 andreas:01 border:98 differs:01 Bonjour, What does Andreas Rossberg in his SML vs. Caml page http://www.ps.uni-sb.de/~rossberg/SMLvsOcaml.html mean when he says that [Caml] Does not have a proper generic equality on one hand (1, r) != (1, r), on the other (1, r) = (1, ref 1) Is this the "problem" he is pointing ? # let r = ref 1 in (1, r) = (1, r);; - : bool = true # let r = ref 1 in (1, r) != (1, r);; - : bool = true As far as I understand the only dark corners with structural equality are border cases (Nan) where compare differs from (=). [from Pervasives.ml] external (=) : 'a -> 'a -> bool = "%equal" external (<>) : 'a -> 'a -> bool = "%notequal" external compare: 'a -> 'a -> int = "%compare" external (==) : 'a -> 'a -> bool = "%eq" external (!=) : 'a -> 'a -> bool = "%noteq" Diego Olivier