English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Re: [Caml-list] Strings as arrays or lists...
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-03-03 (17:41)
From: Diego Olivier Fernandez Pons <Diego-Olivier.FERNANDEZ-PONS@c...>
Subject: Re: [Caml-list] Strings as arrays or lists...

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'

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