Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: -- (:)
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 Archives:
Bug reports: FAQ:
Beginner's list: