From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id OAA03419 for caml-redistribution; Thu, 7 Oct 1999 14:16:12 +0200 (MET DST) 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 KAA12770 for ; Thu, 7 Oct 1999 10:40:59 +0200 (MET DST) Received: from enst.enst.fr (enst.enst.fr [137.194.2.16]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id KAA02587 for ; Thu, 7 Oct 1999 10:40:59 +0200 (MET DST) Received: from Montchapet.ecole (root@cal-ppp23.ppp.enst.fr [137.194.3.23]) by enst.enst.fr (8.9.1a/8.9.1) with ESMTP id KAA10626 for ; Thu, 7 Oct 1999 10:40:56 +0200 (MET DST) Received: from localhost (localhost [[UNIX: localhost]]) by Montchapet.ecole (8.9.3/8.9.3) id KAA06560 for caml-list@inria.fr; Thu, 7 Oct 1999 10:39:04 GMT From: Michel Quercia Reply-To: quercia@cal.enst.fr To: caml-list@inria.fr Subject: Re: speed versus C Date: Thu, 7 Oct 1999 10:26:32 +0000 X-Mailer: KMail [version 1.0.17] Content-Type: text/plain References: <99100702163301.21475@ice> MIME-Version: 1.0 Message-Id: <99100710390400.06539@Montchapet> Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit Sender: weis William Chesters : : Incidentally, implementing a Vector in ocaml is slightly fiddly, : because you have to keep valid pointers of the right type in even the : unused part all the time. This means o.a. delaying the creation of : the underlying array until you have at least one element to put in it. I disagree, better fill-in the vector with dummy values on creation (fe. Val_unit), otherwise you may keep pointers to data that can not be reclaimed, though semantically unreachable. Gerd.Stolpmann : : Caml is simply not good at arrays. I think it is not a good idea to adopt too : much imperative style. Please, let the user decide by himself if he wants to write imperative or functionnal code. Depending on the particular problem he his solving, his own preferences and sometimes also the weather of the day, he may choose one or the other style or even mix both. Why not ? -- Michel Quercia 9/11 rue du grand rabbin Haguenauer, 54000 Nancy http://pauillac.inria.fr/~quercia mailto:quercia@cal.enst.fr