From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q3CHLCEm019238 for ; Thu, 12 Apr 2012 19:21:12 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlADABMOh0/B/BfUlGdsb2JhbABEDoMOs0mDMwEBAQEJCwkJFAMkggkBAQU4QAEQCxgJFg8JAwIBAgFFBg0BBwEBiA66NJF+BJVshXKMdDk X-IronPort-AV: E=Sophos;i="4.75,411,1330902000"; d="scan'208";a="140024504" Received: from msa03.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.212]) by mail4-smtp-sop.national.inria.fr with ESMTP; 12 Apr 2012 19:21:06 +0200 Received: from [192.168.1.105] ([86.195.143.161]) by mwinf5d28 with ME id x5M51i00R3V8rWW035M6Fp; Thu, 12 Apr 2012 19:21:06 +0200 Message-ID: <4F870F05.5010903@frisch.fr> Date: Thu, 12 Apr 2012 19:21:09 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: Leo P White CC: Gabriel Scherer , caml References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] [ANN] ocamlopen 1.0.2 On 04/12/2012 07:07 PM, Leo P White wrote: > Just like exceptions, they are represented as constructors whose first > field points to an address that is allocated by the extension definition > to represent that extension. They have a special tag value so that > structural equality knows to compare the first fields by address. Note > that this is exactly what is required to fix the bug with structural > equality on exceptions (4765). Do we really need a new special tag? Why not use Object_tag and represent slots as blocks of size 2 (constructor name + unique integer as the second field)? This would have the following consequences (which are the expected ones): - The generic equality function compares the unique ids. - The generic hash function returns the unique id. - The generic unmarshaling function allocates a fresh id when umarshaling such a block. Alain