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
[oliver: Re: [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-23 (20:20)
From: oliver@f...
Subject: [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
----- Forwarded message from oliver -----

To: Richard Jones <>
Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys

On Fri, Apr 23, 2004 at 04:03:22PM +0100, 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.


Hashtables are an ideal tool for many applications,
where retrieving BY KEYs is necessary.
I mean it seems like they were imvented to do this.
So, why should a person write a keys-function by him/herself,
if this is the MAIN work for what Hashtables are useful?

If it only makes sense to collect some data, no Hashtbl
would be necessary and instead a list could be used.

But Hashtables are there to do jobs, where we have
keys and get values.

Hashtbl.keys gives a complete access to all valid
Hastbl.find/Hashtbl.find_all retrievals.
So, when there is a Hashtbl.keys not trying stochastical
"let's look if there is something inside" must be done,
but certain retrieves for data.


----- End forwarded message -----

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