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 KAA17145; Sat, 28 Feb 2004 10:55: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 KAA16521 for ; Sat, 28 Feb 2004 10:55:36 +0100 (MET) Received: from smtp.web.de (smtp02.web.de [217.72.192.151]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i1S9tfIq026417 for ; Sat, 28 Feb 2004 10:55:41 +0100 Received: from [213.6.74.64] (helo=wiko) by smtp.web.de with smtp (WEB.DE 4.99 #605) id 1Ax1C3-0008Ev-00 for caml-list@inria.fr; Sat, 28 Feb 2004 10:55:35 +0100 Message-ID: <007d01c3fde1$047c9bd0$404a06d5@wiko> From: "Andreas Rossberg" To: References: <20040228094034.81565.qmail@web41905.mail.yahoo.com> Subject: Re: [Caml-list] Semantics of physical equality Date: Sat, 28 Feb 2004 10:55:37 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 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; rossberg:01 caml-list:01 pervasives:01 htmlman:01 semantics:01 ocaml:01 caml:01 equality:01 mutable:01 mutable:01 int:01 int:01 assert:02 assert:02 ambiguous:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk sejourne kevin wrote: > > 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 ? No, only let x = r and y = r in assert (x == y) Neither r.b nor r.a are mutable, only r itself is. - Andreas ------------------- 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