Dear OCaml users,

I need to translate a C++ tree structure into its OCaml equivalent in a safe and efficient way.

I wrote up the details at stackoverflow:

https://stackoverflow.com/questions/46562400/how-to-safely-translate-tree-data-structures-between-c-ocaml

Forgive me, if that kind of cross-referencing is frowned upon ;), I wanted to cover as large an audience as possible.

The gist is that I do not want to use some intermediate serialization format but rather traverse and construct in one pass and how to do that with OCaml's GC in between.

Any comments are very much appreciated.

Christoph