From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 10B54BCAB for ; Sat, 14 May 2005 21:09:48 +0200 (CEST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j4EJ9lUC017407 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Sat, 14 May 2005 21:09:47 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1DX21D-0006o9-7z for caml-list@yquem.inria.fr; Sat, 14 May 2005 20:09:47 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] A nastier example Date: Sat, 14 May 2005 20:09:28 +0100 User-Agent: KMail/1.7.1 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200505142009.29177.jon@ffconsultancy.com> X-Miltered: at concorde with ID 42864CFB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 toplevel:01 ocamlc:01 trade-offs:01 pitfalls:01 ocaml:01 usefulness:01 ocaml:01 ...:98 frog:98 wrote:01 equality:01 polymorphic:01 imho:01 ideally:01 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 Saturday 14 May 2005 15:51, Julien Verlaguet wrote: > Is this the behaviour we want ? Ideally, no. > Can two values of different types be equal ? In theory, no. > I agree that this wouldn't be a problem if it would only work in a > toplevel ... Does code ever work differently in the top-level than when compiled (with ocamlc)? Should it? > But it compiles in structures as well !! 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?". To which the answer, for me at least, is "I can't". There are many pitfalls associated with equality in OCaml but the existence of polymorphic comparisons is easily justified by their usefulness, IMHO. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists