Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
symbol managment in Caml
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Claudio Sacerdoti Coen <sacerdot@s...>
Subject: Re: symbol managment in Caml

 I have had the same problem and I was about to write the
 new function when I stopped: the time taken by the hash
 function was not worth the extra coding.

 But I think that it's really a great pity that the
 standard library lacks such a function. Moreover, it
 should be really easy to implement it. Could we expect
 it implemented?


On Fri, Feb 25, 2000 at 13:16:22 +0100, Stephan Houben wrote:
> Hello list,
> I am writing an interpreter for a simple language in O'Caml.
> The interpreter often needs to search a hash table with a string
> as key. A common optimization for this is to use pointer identity
> instead of string equality, and "intern" every string before using
> it as a key to the hash table.
> Unfortunately, I don't see how to do this with the current O'Caml
> libs. You can do identity checks with ==, but there seems no way
> to get a good hash corresponding to ==.
> Has anyone already written some code for this task?
> Thanks in advance,
> Stephan

Real Name: Claudio Sacerdoti Coen
Address: via del Colle n.6
	 S. Lazzaro di Savena (BO)