Version française
Home     About     Download     Resources     Contact us    
Browse thread
How to do this properly with OCaml?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Brian Hurt <bhurt@s...>
Subject: Re: [Caml-list] How to do this properly with OCaml?


On Sat, 23 Jul 2005, Thomas Fischbacher wrote:

> If I duplicate entries to fill up holes, and later on remove a
> legitimate entry whose duplicates fill holes from the heap, I have to
> introduce extra bookkeeping so that the other placeholder copies of that
> entry are replaced as well - otherwise it could not be reclaimed by GC.

I'd be very inclined just to use options- especially since, as you've 
mentioned in other posts, the elements you're putting into the heap are 
are fairly large and expensive to create.  In this case, the overhead of 
options is small, relative to the rest of the data.

Brian