caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "forum@x9c.fr" <forum@x9c.fr>
To: caml users <caml-list@inria.fr>
Cc: x9c <forum@x9c.fr>
Subject: Re: [Caml-list] Marshalling question
Date: Sat, 9 Oct 2010 09:58:25 +0200	[thread overview]
Message-ID: <45949581-8B9C-4E29-9308-33D7689C7F98@x9c.fr> (raw)
In-Reply-To: <AANLkTikE_t9gDF0GojjytXyZwOZCdVy4chLt2xiVc_ge@mail.gmail.com>


Le 8 oct. 2010 à 15:37, Jean Krivine a écrit :

> Dear ocaml users,
> 
> A simple question: is it safe to marshalize a data structure that
> contains imperative elements (like arrays or hashtbl) ?

Well, you should have no problem with arrays or hash tables,
as long as they hold elements that are themselves marshallable.

To the best of my knowledge, marshalling is either not possible or unsafe with :
  - weak array, or weak hash table ;
  - exceptions ;
  - functional values in some settings (e. g. native compilation, use of "Dynlink"),
    and hence lazy values, streams, or any functional/imperative structure
    holding a closure.
Finally, I have some slight doubts regarding objects, and first-class modules
(they should be marshallable modulo the restrictions above, but never tested
this point).


Hope this helps,

Xavier Clerc


      parent reply	other threads:[~2010-10-09  7:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-08 13:37 Jean Krivine
2010-10-08 13:39 ` [Caml-list] " David Allsopp
2010-10-08 13:48 ` Mathias Kende
2010-10-12  8:42   ` Alexey Rodriguez
2010-10-12  9:25     ` Julien Signoles
2010-10-12  9:26     ` Mathias Kende
2010-10-12  9:42       ` Julien Signoles
2010-10-12  9:48         ` Alexey Rodriguez
2010-10-09  7:58 ` forum [this message]

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=45949581-8B9C-4E29-9308-33D7689C7F98@x9c.fr \
    --to=forum@x9c.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;
as well as URLs for NNTP newsgroup(s).