English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: Why OCaml sucks
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2008-05-10 (08:24)
From: Berke Durak <berke.durak@g...>
Subject: Re: [Caml-list] Re: Why OCaml rocks
On Sat, May 10, 2008 at 9:52 AM, Richard Jones <rich@annexia.org> wrote:

> On Sat, May 10, 2008 at 01:01:03AM +0200, Berke Durak wrote:
> > But you are saying in the README that values in the ancient heap have
> some
> > limitations, namely no ad-hoc polymorphic primitives.
> You misunderstand this limitation, but anyway ...

The paragraph from your README then needs some clarification.

> (1) Ad-hoc polymorphic primitives (structural equality, marshalling
> and hashing) do not work on ancient data structures, meaning that you
> will need to provide your own comparison and hashing functions.  For
> more details see Xavier Leroy's response here:

As you cannot mutate anything that is ancient (since it might be
accessed), you cannot mark or modify them in-place for ad-hoc marshalling or
deep copying.  Is that correct?

Comparison does not mark (and thus does not work on cyclic structures).
Does it work on values in the ancient heap (I'm not talking of handles

So it seems that adding a generic copy-out-of-the-ancient heap function
(which marks in a private area) would be worthwhile.  Should not be too