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 LAA17219; Sat, 28 Feb 2004 11:10:08 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA18871 for ; Sat, 28 Feb 2004 11:10:07 +0100 (MET) Received: from nemerle.org (lilith.ii.uni.wroc.pl [156.17.4.7]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1SAA6ae019717 for ; Sat, 28 Feb 2004 11:10:06 +0100 Received: from malekith by nemerle.org with local (Exim 4.24) id 1Ax1Q5-0000NC-O7 for caml-list@inria.fr; Sat, 28 Feb 2004 11:10:05 +0100 Date: Sat, 28 Feb 2004 11:07:04 +0100 From: Michal Moskal To: caml-list@inria.fr Subject: Re: [Caml-list] Semantics of physical equality Message-ID: <20040228100704.GA11864@roke.freak> Mail-Followup-To: caml-list@inria.fr References: <20040228094034.81565.qmail@web41905.mail.yahoo.com> <007d01c3fde1$047c9bd0$404a06d5@wiko> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <007d01c3fde1$047c9bd0$404a06d5@wiko> User-Agent: Mutt/1.4.1i X-PGP-Fingerprint: CF89 1B14 11BE 1CC9 2CA3 7497 5E32 69B4 BC71 B4C2 X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; michal:01 moskal:01 malekith:01 pld-linux:01 caml-list:01 2004:99 rossberg:01 michal:01 moskal:01 malekith:01 kernel:01 semantics:01 ints:01 ints:01 equality:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Feb 28, 2004 at 10:55:37AM +0100, Andreas Rossberg wrote: > > 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. But both r.a and r.b are ints, so it is always OK (== and = are the same on ints). -- : Michal Moskal :: http://www.kernel.pl/~malekith :: GCS !tv h e>+++ b++ : When in doubt, use brute force. -- Ken Thompson :: UL++++$ C++ E--- a? ------------------- 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