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 TAA06471; Mon, 26 Apr 2004 19:17:32 +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 TAA07130 for ; Mon, 26 Apr 2004 19:17:31 +0200 (MET DST) Received: from ptb-relay03.plus.net (ptb-relay03.plus.net [212.159.14.214]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i3QHHUjq006203 for ; Mon, 26 Apr 2004 19:17:30 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay03.plus.net with esmtp (Exim) id 1BI9jW-000D6U-4J for caml-list@inria.fr; Mon, 26 Apr 2004 17:17:30 +0000 From: Jon Harrop Organization: University of Cambridge To: caml-list Subject: Re: [oliver: Re: [Caml-list] Should be INSIDE STANDARD-LIB: Hashtbl.keys] Date: Mon, 26 Apr 2004 18:13:31 +0100 User-Agent: KMail/1.5.4 References: <20040423200923.GA271@first.in-berlin.de> <200404252106.34024.jdh30@cam.ac.uk> <20040426101435.GA8694@redhat.com> In-Reply-To: <20040426101435.GA8694@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404261813.31175.jdh30@cam.ac.uk> 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; oliver:01 caml-list:01 hashtbl:01 2004:99 committee's:99 newbies:01 imho:01 int:01 handles:01 wrote:03 library:03 stl:03 arguments:03 data:03 explanation:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Monday 26 April 2004 11:14 am, Richard Jones wrote: > > ... > Don't you think that this is a rather special case, and probably you > should have built your own data structure? No, that applies whenever you have a program which handles a lot of containers. I think containers should be "light" for that reason. > For general purpose programming having the extra int (in STL) probably > made sense [not that I've used C++ for years, and I don't think I'll > be using it again]. It is of very little advantage, IMHO. If it were for a trait which required a similar amount of storage but which could not be easily or efficiently maintained from the outside then yes, sure. IIRC, the committee's explanation for making lists carry around and update their own length was that newbies might not expect "size()" to be O(n). I don't think such arguments are constructive when designing a standard library... Cheers, Jon. ------------------- 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