From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id BEEB5D560 for ; Sun, 31 Jul 2005 04:54:36 +0200 (CEST) Received: from ash25e.internode.on.net (ash25e.internode.on.net [203.16.214.182]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j6V2sYfI024269 for ; Sun, 31 Jul 2005 04:54:35 +0200 Received: from rosella (ppp11-151.lns1.syd7.internode.on.net [59.167.11.151] (may be forged)) by ash25e.internode.on.net (8.12.9/8.12.6) with ESMTP id j6V2sJYe035038; Sun, 31 Jul 2005 12:24:20 +0930 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] How to do this properly with OCaml? From: skaller To: Thomas Fischbacher Cc: Brian Hurt , Stephane Glondu , caml-list@yquem.inria.fr In-Reply-To: References: <200507241623.13705.Stephane.Glondu@crans.org> <1122251570.9027.362.camel@localhost.localdomain> <200507242345.13152.Stephane.Glondu@crans.org> <1122291335.6766.33.camel@localhost.localdomain> <42E58B87.9040206@crans.org> <1122478420.6768.36.camel@localhost.localdomain> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-0z+GCSxBEMXBbREDm1PP" Date: Sun, 31 Jul 2005 12:54:19 +1000 Message-Id: <1122778459.2174.50.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 X-Miltered: at nez-perce with ID 42EC3D6A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 arrays:01 arrays:01 ocaml:01 compiler:01 compiler:01 setjmp:01 stack:01 condemns:01 generations:01 unions:01 lexically:01 categorical:01 onerous:98 X-Attachments: type="application/pgp-signature" name="signature.asc" 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 --=-0z+GCSxBEMXBbREDm1PP Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2005-07-31 at 01:24 +0200, Thomas Fischbacher wrote: > I originally was somewhat worried whether extensible arrays really would=20 > be such a dramatic improvement - what if the next person needs displaced=20 > arrays, or any other functionality from CL's arrays with their many bells= ,=20 > gongs, and whistles? But thinking a bit more about it, it seems as if > virtually anything of interest could be accomplished by other means, with= =20 > the exception of just extensible arrays. You have gone further than me, since your thoughts support the proposition that extensible arrays are the *only* data structure missing from the core libraries, which cannot be safely encoded by the end user in Ocaml. Whether or not that proposition is sustainable, it would just be nice if the programmer had a choice: it should not really be that the compiler vendor forces the programmer to make a particular choice for their application, IMHO. I have been quite involved in another such scenario, where the compiler vendor 'forces' the naive C programmer requiring user space context switching to write compiler dependent assembly code to do that job, since the standard library setjmp/longjmp doesn't quite do enough. For C this is not too onerous, particular for OS that now provide this support in a library .. however for C++ it is virtually impossible, since with exception handling the stack modelling is much more difficult than plain C. My argument here is that 'control exchange' is an absolutely fundamental computing primitive, and the failure of the C language to provide it utterly condemns C as a general language -- and has forced generations of developers to encoding things badly, lead to miseducation, and=20 a lot of other serious problems. I would direct the same wrath at C++ for failing to provide proper discriminated unions and first class lexically scoped functions: to build a programming system that deliberately omits *fundamentals* of programming is shameful. Of course this doesn't apply nearly as strongly to extensible arrays: they're hardly fundamental in the theoretical sense that control exchange, categorical sums, and first class functions with closures are: its merely a commonly data structure, certainly less useful in Ocaml than some other systems. --=20 John Skaller --=-0z+GCSxBEMXBbREDm1PP Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQBC7D1ZsRp8/9aGVGsRAs2DAJ91dEebOPzNBa9sSJ5MfxXQ8KOkIACghKEE BENEpUAoKbzga/hSz9cabW0= =sbDW -----END PGP SIGNATURE----- --=-0z+GCSxBEMXBbREDm1PP--