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 SAA04810; Mon, 3 Mar 2003 18:41:26 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA06529 for ; Mon, 3 Mar 2003 18:41:24 +0100 (MET) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h23HfNT23136 for ; Mon, 3 Mar 2003 18:41:23 +0100 (MET) Received: from ibm3.cicrp.jussieu.fr (ibm3.cicrp.jussieu.fr [134.157.15.3]) by shiva.jussieu.fr (8.12.5/jtpda-5.4) with ESMTP id h23HfMYY010580 for ; Mon, 3 Mar 2003 18:41:22 +0100 (CET) Received: from ibm1.cicrp.jussieu.fr (ibm1.cicrp.jussieu.fr [134.157.15.1]) by ibm3.cicrp.jussieu.fr (8.8.8/jtpda/mob-V8) with ESMTP id SAA27966 for ; Mon, 3 Mar 2003 18:40:20 +0100 Received: from localhost (fernande@localhost) by ibm1.cicrp.jussieu.fr (8.8.8/jtpda/mob-v8) with ESMTP id SAA4292812 for ; Mon, 3 Mar 2003 18:40:20 +0100 Date: Mon, 3 Mar 2003 18:40:20 +0100 (NFT) From: Diego Olivier Fernandez Pons To: caml-list@inria.fr Subject: Re: [Caml-list] Strings as arrays or lists... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Antivirus: scanned by sophie at shiva.jussieu.fr X-Spam: no; 0.00; pons:01 cicrp:01 caml-list:01 char:01 flamewar:01 haskell:01 unboxed:01 ropes:01 applicative:01 camomile:01 catenable:01 ralf:01 hinze:01 arrays:01 fernandez:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Bonjour, Brian Rogoff wrote : > As far as char lists being somewhat advantageous in a lazy language, > well, I won't start a flamewar as to whether laziness as the default > is a good design decision (oh hell, I'll admit, I think it isn't) > but I'll repeat my observation that in the Clean language, also lazy > by default like Haskell, strings are unboxed character arrays. Caml is a 'most of the time strict but lazy when you need' language whereas Haskell is a 'most of the time lazy but strict when you need' one. And Caml already provides support for lazy lists by means of the Stream module, which is pretty good and convenient. > I'm sure there are numerous ideas just for string libraries, and > that we could fill an entire mailing list just with those. Ropes (a > binary tree representation for applicative "big strings") and > extended character sets (I guess Camomile is doing that now?) are my > favorites. Hum... Fast catenable arrays are the subject of Ralf Hinze last paper 'bootstrapping one-side flexible arrays'. He uses weight balanced trees of imperative arrays. It also makes a good representation for (precomputed) streams. Diego Olivier ------------------- 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