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

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to