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 UAA03753; Mon, 11 Aug 2003 20:57:02 +0200 (MET DST) 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 UAA15976 for ; Mon, 11 Aug 2003 20:57:00 +0200 (MET DST) Received: from cog.brown.edu (titan.cog.brown.edu [128.148.208.226]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h7BIv0f08035 for ; Mon, 11 Aug 2003 20:57:00 +0200 (MET DST) Received: from venere.cog.brown.edu ([128.148.208.214] verified) by cog.brown.edu (CommuniGate Pro SMTP 4.0.6) with ESMTP id 506730 for caml-list@inria.fr; Mon, 11 Aug 2003 14:56:59 -0400 Received: from venere.cog.brown.edu (localhost.localdomain [127.0.0.1]) by venere.cog.brown.edu (8.12.9/8.12.9) with ESMTP id h7BItBxv012662 for ; Mon, 11 Aug 2003 14:55:12 -0400 Received: (from tahir@localhost) by venere.cog.brown.edu (8.12.9/8.12.9/Debian-5) id h7BIslk0012659 for caml-list@inria.fr; Mon, 11 Aug 2003 14:54:47 -0400 X-Authentication-Warning: venere.cog.brown.edu: tahir set sender to tahir@acm.jhu.edu using -f Subject: [Caml-list] comparing references From: Tahir H Butt To: caml-list@inria.fr Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1060628087.11843.16.camel@venere.cog.brown.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.3 Date: 11 Aug 2003 14:54:47 -0400 X-Loop: caml-list@inria.fr X-Spam: no; 0.00; butt:99 cog:99 int:01 comparison:02 compares:03 types:03 let:04 type:07 i'm:07 www:91 comparing:09 examined:90 linguistic:90 references:11 student:11 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk I don't know for sure, so I decided to ask around. My question is this: given two references, when one compares them, is it just the addressing which is examined, or the actual content? For instance: type symbol = Symbol of int let a = ref (Symbol 1) in let b = ref (Symbol 2) in let c = ref (Symbol 1) in .... upon inspection, a=c -> true, and a=b -> false, as desired. But, is this comparison as simple as comparing two numbers? I ask because my sum types can be big (I'm dealing with trees), so it would be good if when I want to check if two trees are the same, all I need to do is look at the references to them. Thanks, Tahir H Butt Brown University Cognitive and Linguistic Sciences PhD Student http://www.cog.brown.edu/~tahir ------------------- 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