From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 5908DBD23 for ; Mon, 15 Nov 2004 22:30:09 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id iAFLU8TG002216 for ; Mon, 15 Nov 2004 22:30:09 +0100 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 WAA06911 for ; Mon, 15 Nov 2004 22:30:08 +0100 (MET) Received: from qrnik.knm.org.pl (paf87.warszawa.sdi.tpnet.pl [217.96.225.87]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id iAFLU5Ys000452 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Mon, 15 Nov 2004 22:30:08 +0100 Received: from qrczak by qrnik.knm.org.pl with local (Exim 3.36 #1) id 1CToQG-0003pE-00 for caml-list@inria.fr; Mon, 15 Nov 2004 22:30:04 +0100 To: caml-list@inria.fr Subject: Re: [Caml-list] Hashtbls with physical equality? X-Face: OW>RV&gN+&b-aiNY|U)f=S%w+/rK!);f>/W9IXg})]&F>ht.1Up8@04+_!gOp(_/l_-+E^. 2\vI)1=D,%HWiq)r(M/V~dr^5T^KF/[w5YZ4<0Sus3+O>l3uA/&W_21m?.s,Po8{pb0@ References: From: "Marcin 'Qrczak' Kowalczyk" Mail-Followup-To: caml-list@inria.fr Date: Mon, 15 Nov 2004 22:30:04 +0100 In-Reply-To: (Brian Hurt's message of "Mon, 15 Nov 2004 14:37:36 -0600 (CST)") Message-ID: <87wtwm242r.fsf@qrnik.zagroda> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: "Marcin 'Qrczak' Kowalczyk" X-Miltered: at concorde with ID 41991FE1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 41991FDD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 hashcode:01 compares:01 pointers:01 hashcode:01 equality:01 writes:01 usable:01 int:01 objects:02 brian:03 implement:05 equals:06 equals:06 distribution:09 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: Brian Hurt writes: > There is no magic value associated with objects, unlike Java. Personally, > I think that was one of the biggest screwups with Java. Where is it in Java? As far as I know Java does not provide any way to obtain a unique int corresponding to object identity. It does provide a default hashCode() which is compatible with the default equals(), and the default equals() compares pointers, but hashCode() does not have to be unique. It's still hard to implement the default hashCode() with a copying GC (with a usable distribution and without overheads). -- __("< Marcin Kowalczyk \__/ qrczak@knm.org.pl ^^ http://qrnik.knm.org.pl/~qrczak/