Browse thread
[oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys]
- oliver@f...
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | oliver@f... |
| Subject: | [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys] |
----- Forwarded message from oliver ----- To: Richard Jones <rich@annexia.org> 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. FULL ACK 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. Ciao, Oliver ----- End forwarded message ----- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners