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

2010-11-17 Thread Steve Teale
Andrei Alexandrescu Wrote: > > It's probably common courtesy that should be preserved. I just committed > the fix prompted by Lutger (thanks). > > Andrei Thanks Andrei. When the next version is released I'll remove the temporary findRex() function from my current code. Steve ;=)

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

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 14:24:32 -0500, Steve Teale wrote: Steven Schveighoffer Wrote: I'm guessing you are referring to php's pcre vs posix regex? I think posix is marked as deprecated... Steve, No. I just meant that the library that comes with PHP seems happy to provide different ways

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

2010-11-16 Thread bearophile
Steve Teale: > The current system, where modules of the library can get arbitrarily > deprecated and at some point removed because they are unfashionable, is very > unfriendly. We are in the initial phase of Phobos develpment, so frequent large changes are expected. Surely one year from now Ph

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

2010-11-16 Thread spir
On Tue, 16 Nov 2010 11:24:02 -0800 Jonathan M Davis wrote: > On Tuesday, November 16, 2010 10:30:03 Steven Schveighoffer wrote: > > 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. > > Agreed. Ideal

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

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 10:46 AM, Steve Teale wrote: Steven Schveighoffer Wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale 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

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

2010-11-16 Thread Jonathan M Davis
On Tuesday, November 16, 2010 10:30:03 Steven Schveighoffer wrote: > 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. Agreed. Ideally, the standard library would be very uniform in approach. That makes

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

2010-11-16 Thread Steve Teale
Steven Schveighoffer Wrote: >> > I'm guessing you are referring to php's pcre vs posix regex? I think > posix is marked as deprecated... > Steve, No. I just meant that the library that comes with PHP seems happy to provide different ways of doing the same thing, as in for example, CURL, DOM

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

2010-11-16 Thread Andrei Alexandrescu
On 11/16/10 10:16 AM, Steve Teale wrote: Andrei Alexandrescu Wrote: I am sorry for the inadvertent change, it wasn't meant to change semantics of existing code. I'm not sure whether one of my unrelated 64-bit changes messed things up. You may want to file a bug report. There are a number of g

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

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 13:46:48 -0500, Steve Teale wrote: Steven Schveighoffer Wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale wrote: > > Andrei, > > Maybe it is time that the structure of the standard library became more > generalized. At the moment we have std... and core... > > P

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

2010-11-16 Thread sybrandy
On 11/16/2010 01:30 PM, Steven Schveighoffer wrote: On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale 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, li

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

2010-11-16 Thread Steve Teale
Steven Schveighoffer Wrote: > On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale > 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 hierar

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

2010-11-16 Thread Steven Schveighoffer
On Tue, 16 Nov 2010 13:16:13 -0500, Steve Teale 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 mo

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

2010-11-16 Thread Steve Teale
Andrei Alexandrescu Wrote: > > I am sorry for the inadvertent change, it wasn't meant to change > semantics of existing code. I'm not sure whether one of my unrelated > 64-bit changes messed things up. You may want to file a bug report. > > There are a number of good reasons for which I was co

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

2010-11-15 Thread Lutger Blijdestijn
Steve Teale wrote: > KennyTM~ Wrote: > >> On Nov 15, 10 14:58, Steve Teale wrote: >> > Some time ago in phobos2, the following: >> > >> > RegExp wsr = RegExp("(\\s+)"); >> > int p = wsr.find(""); >> > writefln("%s|%s|%s %d",wsr.pre(), wsr.match(1), wsr.post(), p); >> > >> > would pri

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

2010-11-15 Thread Andrei Alexandrescu
On 11/15/10 7:55 AM, Steve Teale wrote: KennyTM~ Wrote: On Nov 15, 10 14:58, Steve Teale wrote: Some time ago in phobos2, the following: RegExp wsr = RegExp("(\\s+)"); int p = wsr.find(""); writefln("%s|%s|%s %d",wsr.pre(), wsr.match(1), wsr.post(), p); would print: 7 No

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

2010-11-15 Thread Jesse Phillips
Steve Teale Wrote: > I guess std.regexp is still there because not all of us necessarily want to > iterate a range to simply find out the position of the first whitespace in a > string. I'm pretty sure it is still there for the same reason many are, trying to figure out when it should be remov

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

2010-11-15 Thread Steve Teale
KennyTM~ Wrote: > On Nov 15, 10 14:58, Steve Teale wrote: > > Some time ago in phobos2, the following: > > > > RegExp wsr = RegExp("(\\s+)"); > > int p = wsr.find(""); > > writefln("%s|%s|%s %d",wsr.pre(), wsr.match(1), wsr.post(), p); > > > > would print: > > > > 7 > > > > Now it p

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

2010-11-15 Thread KennyTM~
On Nov 15, 10 14:58, Steve Teale wrote: Some time ago in phobos2, the following: RegExp wsr = RegExp("(\\s+)"); int p = wsr.find(""); writefln("%s|%s|%s %d",wsr.pre(), wsr.match(1), wsr.post(), p); would print: 7 Now it prints 1 The new return value is pretty useless, equiv