caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Edgar Friendly <thelema314@gmail.com>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Can one implement greedy/inline data structures in ocaml?
Date: Wed, 07 Mar 2012 10:00:02 -0500	[thread overview]
Message-ID: <4F5777F2.2000806@gmail.com> (raw)
In-Reply-To: <87sjhktqwi.fsf@frosties.localnet>

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.

  reply	other threads:[~2012-03-07 15:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 14:41 Goswin von Brederlow
2012-03-07 15:00 ` Edgar Friendly [this message]
2012-03-07 16:32   ` Goswin von Brederlow
2012-03-07 16:58     ` Gabriel Scherer
2012-03-08  5:11       ` Goswin von Brederlow
2012-03-08  8:51         ` Gabriel Scherer
2012-03-09  7:50           ` Goswin von Brederlow
2012-03-09  9:21             ` Gabriel Scherer
2012-03-09 13:29               ` Markus Weißmann
2012-03-10 12:37                 ` Goswin von Brederlow
2012-03-09 15:43               ` Hezekiah M. Carty
2012-03-10 12:49               ` Goswin von Brederlow
2012-03-08 13:31         ` Gerd Stolpmann
2012-03-09  7:29           ` Goswin von Brederlow

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=4F5777F2.2000806@gmail.com \
    --to=thelema314@gmail.com \
    --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).