From: Alain Frisch <alain@frisch.fr>
To: Leo P White <lpw25@cam.ac.uk>
Cc: Gabriel Scherer <gabriel.scherer@gmail.com>, caml <caml-list@inria.fr>
Subject: Re: [Caml-list] [ANN] ocamlopen 1.0.2
Date: Thu, 12 Apr 2012 19:21:09 +0200 [thread overview]
Message-ID: <4F870F05.5010903@frisch.fr> (raw)
In-Reply-To: <Prayer.1.3.4.1204121807300.29470@hermes-2.csi.cam.ac.uk>
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
next prev parent reply other threads:[~2012-04-12 17:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 21:13 Leo P White
2012-04-12 12:56 ` Gabriel Scherer
2012-04-12 14:03 ` Alain Frisch
2012-04-12 14:16 ` Philippe Veber
2012-04-12 14:29 ` Alain Frisch
2012-04-17 10:02 ` Philippe Veber
2012-04-12 17:07 ` Leo P White
2012-04-12 17:21 ` Alain Frisch [this message]
2012-04-12 20:31 ` Leo P White
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F870F05.5010903@frisch.fr \
--to=alain@frisch.fr \
--cc=caml-list@inria.fr \
--cc=gabriel.scherer@gmail.com \
--cc=lpw25@cam.ac.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox