From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA18090; Sat, 24 Apr 2004 11:22:44 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA18043 for ; Sat, 24 Apr 2004 11:22:43 +0200 (MET DST) Received: from postfix3-1.free.fr (postfix3-1.free.fr [213.228.0.44]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3O9Mgjq001954 for ; Sat, 24 Apr 2004 11:22:42 +0200 Received: from warp (chateaudeau-4-82-225-176-25.fbx.proxad.net [82.225.176.25]) by postfix3-1.free.fr (Postfix) with SMTP id 9321CC4237; Sat, 24 Apr 2004 11:22:41 +0200 (CEST) Message-ID: <005501c429dd$5f478390$19b0e152@warp> From: "Nicolas Cannasse" To: , "Richard Jones" Cc: "caml-list" References: <20040421011904.GA1411@first.in-berlin.de> <20040423145141.B3686@pauillac.inria.fr> <20040423150322.GA21489@redhat.com> <1082771932.21205.654.camel@pelican.wigram> Subject: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys Date: Sat, 24 Apr 2004 11:20:23 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Miltered: at nez-perce by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 hashtbl:01 2004:99 hashtbl:01 hash:01 implemented:01 dynarray:01 extlib:01 cannasse:01 arrays:01 arrays:01 bindings:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 : http://ocaml-lib.sf.net Regards, Nicolas Cannasse ------------------- 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