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
[Caml-list] Caml Development Kit
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-03-27 (03:16)
From: Brian Rogoff <bpr@b...>
Subject: Re: [Caml-list] Caml Development Kit
On Mon, 26 Mar 2001, Patrick M Doane wrote:
> As much as I love Caml as a language, I have to admit that I've been less
> than pleased with the standard infrastructure for string manipulation. 
> First a summary of approaches that I'm aware of: 
>   1) Manipulate the string manually with functions like String.index and
> maintain position variables.  I find this to be pretty error-prone and
> hard to read.
>   2) Use the stream parsers.  I hesitate to use them because of their
> status as "experimental" and that be removed at any time. I also have
> heard claims that their performance is not too good compared with other
> techniques.  Does anyone know if this true? 

This is like shooting squirrels with a sniper rifle. It's quite a bit more 
power than you need for most string processing tasks. I certainly wouldn't 
worry about the "experimental" label since it's been there for quite a
long time. 

Why not steal the substring library from the SML Basis? It's a variant on
your 1) and has the added advantage that we can lift much of the
documentation from the SML community. 

It might even be worthwhile to just steal as much of the Basis library as
possible from Mosml and SML/NJ. Stealing code is this way is good, and it
allows SML programmers to migrate more easily (and ultimately would allow 
Caml programmers easy migration too) which is a good thing. 

As far as regexp libraries go, I like Pcre, but I haven't tried xstr. 

-- Brian

To unsubscribe, mail  Archives: