From: "Basile Starynkevitch [local]" <basile.starynkevitch@inria.fr>
To: caml-list@inria.fr
Subject: Re: [Caml-list] marshalling polymorphic variants
Date: Tue, 29 Jun 2004 09:55:32 +0200 [thread overview]
Message-ID: <20040629075532.GA28862@bourg.inria.fr> (raw)
In-Reply-To: <d61254fb0406281402252e92@mail.gmail.com>
On Mon, Jun 28, 2004 at 11:02:25PM +0200, henri dubois-ferriere wrote:
> in the simple case below, it is possible to marshal out a ([`A | `B]
> list), and then read it back as a [> `A | `B | `C] list.
I think that yes, because:
1. marshalling don't care about type casts (hence you can shot in
your leg if you abuse it) and is not type safe.
2. polymorphic variants are (IIRC) represented by using the hashcode
of their name, so `A is always `A in any polymorphic variant
context.
Regards.
--
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
Project cristal.inria.fr - (temporarily)
http://cristal.inria.fr/~starynke --- all opinions are only mine
-------------------
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
next prev parent reply other threads:[~2004-06-29 7:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-28 21:02 henri dubois-ferriere
2004-06-29 7:55 ` Basile Starynkevitch [local] [this message]
2004-06-29 8:54 ` Jacques GARRIGUE
2004-06-29 8:45 ` Richard Jones
2004-06-29 17:50 ` Alex Baretta
2004-06-29 21:54 ` henri dubois-ferriere
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=20040629075532.GA28862@bourg.inria.fr \
--to=basile.starynkevitch@inria.fr \
--cc=caml-list@inria.fr \
/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