Re: Regular expressions with glib?



Hi!

Am Montag, 12. April 2004 14:23 schrieb Sven Neumann:
> Eike Lange <eike lange uni-essen de> writes:
> > I would like to contribute some regular expression code to GLib.
> > This code uses "regexec(3)" and "regcomp(3)" to do all the stuff
> > with regular expressions (requires regex.h).
> This funtionality is not available on all platforms so you would
> have to include the regex implementation. See for example how GIMP
> does it.

Well, you are right, even we (not me) had this discussion some years 
behind and I hope we come to a different conclusion.
Regex, as it is commonly used is AFAIK "POSIX 1003.2" standard. IMHO, 
this should be the smallest intersection of all systems, but I know 
it isn't. Using this POSIX regex interfaces has the advantage to use 
a commonly widespread library with lots of eyes on details about the 
implementation. Using our own reinvented wheel causes lots of trouble 
with implementation details and possible bugs. As the request for 
this functionality in GLib is at least four years old, no one has 
ever implemented this.

IMHO, we should ask those systems to use POSIX-like functionality or 
implement an autoconf switch "--no-posix" or something like this what 
seems more easy than living without regexp, well, I'm speaking just 
for me.

> I would suggest to consider a separate module for this but I also
> wouldn't mind to see it included with glib.

Using one more module is one more dependency to fulfill which might
be unavailable on some installations.

Eike

-- 
::NETZ-STREIK::  http://www.gnushi.de/  ::NETZ-STREIK::





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]