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-24 (09:22)
From: Nicolas Cannasse <warplayer@f...>
Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys
> On Sat, 2004-04-24 at 01:03, Richard Jones wrote:
> > Maybe there's no good behaviour, but I keep writing a 'keys' function
> > in almost every program I've written which uses Hashtbl, which
> > certainly suggests that something is missing.
> 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.
> I spend some time making sure I don't use that
> feature by mistake.
> Similar 'too rich' functionality exists for
> many data types, for example mutable strings and arrays.
> On the other hand some functionality is missing,
> for example variable length arrays.
> The former can be fixed easily by the client
> building a wrapper library with restricted functionality.
> The latter *needs* to be added to the standard
> library urgently because it cannot be implemented
> at all in Ocaml without magic, and it is a very
> useful and important data structure to have.

You can have a look at the nice DynArray module from the ExtLib :

Nicolas Cannasse

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