From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id EBA68D18D for ; Tue, 26 Jul 2005 03:30:10 +0200 (CEST) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6Q1UAc7013014 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Tue, 26 Jul 2005 03:30:10 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay04.plus.net with esmtp (Exim) id 1DxEGn-0004L0-Bd for caml-list@yquem.inria.fr; Tue, 26 Jul 2005 02:30:09 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] How to do this properly with OCaml? Date: Tue, 26 Jul 2005 02:28:08 +0100 User-Agent: KMail/1.7.2 References: <200507260205.45941.jon@ffconsultancy.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200507260228.09162.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 42E59222.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 stl:01 arrays:01 tweaking:01 ocaml:01 run-time:01 arrays:01 hashtbl:01 hashtbl:01 stack:01 2005,:98 ...:98 ...:98 frog:98 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Tuesday 26 July 2005 02:20, Brian Hurt wrote: > On Tue, 26 Jul 2005, Jon Harrop wrote: > > I came from a C++/STL background and was accustomed to using extensible > > arrays. Having tweaking my perception of suitable data structures to be > > more appropriate when coding in OCaml, I now prefer the idea of a faster > > run-time and no extensible arrays. I've never actually needed them > > (except inside Hashtbl). > > Actually, they aren't needed in hashtbl either... Ooops, yes. I thought Hashtbl used Obj but you're quite right - I was thinking of Queue. > No- variable length arrays are needed when you're implementing other data > structures on top of arrays, like stacks or queues. At which point I > start asking which data structure you really need- a variable length > array, or a stack or queue? I've never used Queue so I guess I'm not even using Obj indirectly... -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. Objective CAML for Scientists http://www.ffconsultancy.com/products/ocaml_for_scientists