std.regexp vs std.regex [Re: RegExp.find() now crippled]

Steven Schveighoffer schveiguy at yahoo.com
Tue Nov 16 10:30:03 PST 2010


On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale  
<steve.teale at britseyeview.com> wrote:
>
> Andrei,
>
> Maybe it is time that the structure of the standard library became more  
> generalized. At the moment we have std... and core...
>
> Perhaps we need another branch in the hierarchy, like ranges... Then  
> there could be a std.range module that was the gateway into ranges...  
> The library could then expand in an orderly fashion, with a wider range  
> of users becoming responsible for the maintenance of of different  
> branches against changes in the language, not against changes in fashion.
>
> Then you could have ranges.regex, that suits you, and the people who  
> were happy with the status quo, could continue to use std.regexp, which  
> should continue to behave like it did in DMD2.029 or whatever it was  
> when I wrote my 'legacy' code.
>
> The current system, where modules of the library can get arbitrarily  
> deprecated and at some point removed because they are unfashionable, is  
> very unfriendly.
>
> I recognize that you are young, hyper-intelligent, and motivated toward  
> fame. But there are other users, like me, who are older, but not senile,  
> and have more conservative attitudes, including the desire to use code  
> they wrote in the past at some point in the future.

The standard library should not have something to please everyone.  If  
there is 5 different styles to do the same thing, it will be a failure.

Can you just copy std.regex from 2.029 and compile it in your project?   
I.e. instead of phobos adding range branch for the new range style, you  
add branch Teale for your style and copy what you like in there.  Then you  
have what you want (may take a little effort on your part, but then you  
control the results).

Also, 2.029 is still available via download, you can still use it.

-Steve


More information about the Digitalmars-d mailing list