earthquake changes of std.regexp to come

Bill Baxter wbaxter at gmail.com
Tue Feb 17 11:21:18 PST 2009


On Wed, Feb 18, 2009 at 3:36 AM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> I'm quite unhappy with the API of std.regexp. It's a chaotic design that
> provides a hodgepodge of functionality and tries to use as many synonyms of
> "to find" in the dictionary (e.g. search, match). I could swear Walter never
> really cared for using regexps, and that is felt throughout the design: it
> fills the bullet point but it's asinine to use.
>
> Besides std.regexp only works with (narrow) strings and we want it to work
> on streams of all widths and structures. One pet complaint I have is that
> std.regexp puts a class around it all as if everybody's favorite pastime
> would be to inherit Regexp and override some random function in it.
>
> In the upcoming releases of D 2.0 there will be rather dramatic breaking
> changes of phobos. I just wanted to ask whether y'all could stomach yet
> another rewritten API or you'd rather use std.regexp as it is for the time
> being.
>

Btw, I've got no problems with you breaking the API of 2.0 either.
Though you might consider moving the current implementation to
std.deprecated.regex and leaving it there for a year with a
pragma(msg, "This module is deprecated").

That way making a quick fix to broken code is just a matter of
inserting ".deprecated" into your import statements.

--bb



More information about the Digitalmars-d mailing list