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
[Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-04-26 (07:49)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys

skaller writes:
 > The problem is that the Ocaml hashtbl isn't a conventional
 > hash table. It allows multiple bindings which means it
 > cannot be treated as a simple container.

It's  probably done  on  purpose.  Indeed, it  is  very convenient  to
implement symbol tables --- in an imperative way --- because with this
semantics for Hashtbl.add a new  binding really hides any previous one
until the end of its  scope where Hashtbl.remove restores the previous

This has nothing to do with Ocaml; I'm pretty sure you can find C hash
tables implementations with the same feature.


To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: