From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA17529; Sat, 28 Feb 2004 10:40:38 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA14172 for ; Sat, 28 Feb 2004 10:40:37 +0100 (MET) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from web41905.mail.yahoo.com (web41905.mail.yahoo.com [66.218.93.156]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i1S9efIq025761 for ; Sat, 28 Feb 2004 10:40:41 +0100 Message-ID: <20040228094034.81565.qmail@web41905.mail.yahoo.com> Received: from [80.11.230.38] by web41905.mail.yahoo.com via HTTP; Sat, 28 Feb 2004 10:40:34 CET Date: Sat, 28 Feb 2004 10:40:34 +0100 (CET) From: =?iso-8859-1?q?sejourne=20kevin?= Subject: Re: [Caml-list] Semantics of physical equality To: Michal Moskal , caml-list@inria.fr In-Reply-To: <20040227225931.GA9161@roke.freak> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 michal:01 moskal:01 malekith:01 pld-linux:01 2004:99 basile:01 2004:99 0600,:01 non-mutable:01 pervasives:01 htmlman:01 bool:01 ecrit:01 semantics:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk --- Michal Moskal a écrit : > On Fri, Feb 27, 2004 at 10:32:29PM +0100, Basile > STARYNKEVITCH wrote: > > On Fri, Feb 27, 2004 at 02:29:50PM -0600, Kevin S. > Millikin wrote: > > > I'm trying to figure out what I can rely on > about physical equality. > > > I've checked the OCaml manual but can't seem to > find what I want to > > > know. > > > > > > Presume > > > > > > # type t = V0 | V1 of int;; > > > type t = V0 | V1 of int > > > > > > # V0 == V0;; > > > - : bool = true > > > > > > V0's are the same. Is this guaranteed? > > > > Yes. > > Is it? > > "On non-mutable structures, the behavior of (==) is > implementation-dependent;" [1] > > [1] > http://caml.inria.fr/ocaml/htmlman/libref/Pervasives.html Ho! A definition for mutable structures look ambiguous to me: type test = { mutable a:int; b:int };; let r = {a=0;b=2};; let x = r and y = r in assert((x.a==y.a)&&(x.b==y.b)&&(x==y)) ;; Does this always ok ? Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout ! Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/ Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners