Version française
Home     About     Download     Resources     Contact us    
Browse thread
Hash clash in polymorphic variants
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] Re: Hash clash in polymorphic variants
On Monday 14 January 2008 14:44:58 Stefan Monnier wrote:
> > What I meant was simply that instead of using some fixed hash function,
> > one could use a perfect hashing function which is optimal for its known
> > set of inputs, and won't ever generate a collision.
>
> The problem is that the set of inputs is not know at compile time, only
> at link time.

Yes. I think this is another case where OCaml would really benefit from a 
symbol table and this is something else that seems much easier to do with JIT 
compilation.

Also, what happens if you try to dynamically load two libraries that use 
polymorphic variants that clash?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e