On 03/07/2012 09:41 AM, Goswin von Brederlow wrote:
The task then needs pointers to each of the lists data structures creating cycles. Not good for ocaml. It also would waste memory for 2 pointers (per list).
Cycles are fine for ocaml, pointers are pretty cheap, and I think the answer to your question is no - there's a regularity to values that's required by the garbage collector, and what you seem to want is the ability to inline nested structures without pointers, and OCaml's data representation doesn't allow this, mainly because of the tag word needed by the GC.
Beware premature optimization. E. -- Caml-list mailing list. Subscription management and archives: https://sympa-roc.inria.fr/wws/info/caml-list Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs