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 C1D60BC48 for ; Mon, 18 Apr 2005 15:11:04 +0200 (CEST) Received: from irsun282.ifp.fr (ns1.ifp.fr [81.255.42.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j3IDB1WQ027124 for ; Mon, 18 Apr 2005 15:11:04 +0200 Received: from smtp.ifp.fr by irsun282.ifp.fr (V35.12) with ESMTP Received: from irnts70 ([156.118.220.36]) by irnts70 with Microsoft SMTPSVC(5.0.2195.6713); Mon, 18 Apr 2005 15:13:30 +0200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200 Received: From irsun165.ifp.fr ([156.118.22.211]) by irnts70 (WebShield SMTP v4.5 MR1a P0803.345); id 1113830009203; Mon, 18 Apr 2005 15:13:29 +0200 Received: from [156.118.21.21] (irlin234 [156.118.21.21]) by irsun165.ifp.fr (8.8.5/8.8.5) with ESMTP id PAA14599; Mon, 18 Apr 2005 15:10:27 +0200 (MET DST) Message-ID: <4263B1C2.3020109@ifp.fr> Date: Mon, 18 Apr 2005 15:10:26 +0200 From: Christophe DEHLINGER User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andreas Rossberg Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] type of == References: <42637B63.1070608@ifp.fr> <200504181227.07108.jon@ffconsultancy.com> <001901c5440f$ce1a5e80$14b2a8c0@wiko> In-Reply-To: <001901c5440f$ce1a5e80$14b2a8c0@wiko> Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 18 Apr 2005 13:13:30.0312 (UTC) FILETIME=[6A4AD480:01C54418] X-Miltered: at concorde with ID 4263B1E5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; christophe:01 christophe:01 caml-list:01 rossberg:01 abstraction:01 non-mutable:01 mutable:01 non-mutable:01 eventuelles:01 autorisation:01 fulfilled:98 confidentiel:98 expresse:98 unauthorised:98 wrote: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: Andreas Rossberg wrote: >The latter also provides a good argument against making physical = equality >too polymorphic. It would break abstraction, much worse than it does >already. In particular, a program's meaning could depend on = implementation >details (like false being represented by 0) in very questionable ways. > =20 > It's arguable that it wouldn't be /that/ much worse than the current=20 situation, where =3D=3D on non-mutable structures is already = implementation=20 dependent. I am not advocating for such a change though, if only because in most=20 cases the arguments of =3D=3D are known to be of the same type, so it is = a=20 good thing to be able to take advantage of this information. However, it = would still be nice to have both equalities available (yes, I know, yet=20 another equality). In the problem I'm working on, only mutable=20 structures are compared, so the extended =3D=3D would work as intended. = Of=20 course, you would have to know what you're doing when using this=20 predicate, but this is already the case for the current two equalities : = you have to watch out for the aforementioned non-mutable structures with = =3D=3D and for cyclic values with =3D . Call me pessimistic, but I have little hope that this "feature wish"=20 will be fulfilled, so I would happily settle for fun a b -> a =3D=3D=20 (Obj.magic b) (if it works, still haven't had a chance to try it). I'd=20 be grateful if someone could tell me whether this particular use of=20 Obj.magic is safe. Christophe __________________________ Ce message (et toutes ses pi=E8ces jointes =E9ventuelles) est = confidentiel et =E9tabli =E0 l'intention exclusive de ses destinataires. = Toute utilisation de ce message non conforme =E0 sa destination, toute = diffusion ou toute publication, totale ou partielle, est interdite, sauf = autorisation expresse. L'IFP d=E9cline toute responsabilit=E9 au titre = de ce message. This message and any attachments (the message) are confidential and = intended solely for the addressees. Any unauthorised use or = dissemination is prohibited. IFP should not be liable for this message. Visitez notre site Web / Visit our web site : http://www.ifp.fr __________________________