Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Str.string_match raising Invalid_argument "String.sub" in gc
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: [Caml-list] standard regex package
We all agree that the Str regexp library has problems, both on the
interface side (too much global state) and on the implementation side
(fails mysteriously on complex regexps).

The last time this topic came up on this list, I said that we aren't
opposed to put PCRE in the OCaml distribution (provided Markus agrees
with that, of course).  BUT: in the name of backward compatibility, we
must have an Str-compatible interface to this library (same functions
and same regexp syntax as in Str), in addition to the native PCRE
interface.  I think it can be done, but the replies I got to this
request were of the form "I don't have time to do this".

Also: the PCRE interface is quite heavyweight, with a zillion options
whose purpose are not always clear to me.  This can be a bit frightening
and will need a lot of carefully worded documentation to explain that
most of these options are useless 99% of the time :-)  This is not a
criticism towards Markus' work, more like a criticism towards Perl's
and PCRE's "creeping featuritism" syndrom.

So: any taker for writing this Str-compatibility layer?

- Xavier Leroy
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr