earthquake changes of std.regexp to come
Bill Baxter
wbaxter at gmail.com
Tue Feb 17 16:13:03 PST 2009
On Wed, Feb 18, 2009 at 7:44 AM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Bill Baxter wrote:
>>
>> I think this choice is not so much available with D1, plus the
>> constructor situation with D1 is less than ideal. Given that, I think
>> the choice of class for RegEx was apropriate. But if the struct
>> problems are all going away in D2, then that's great. Sounds like
>> you're saying we'll really be able to use D structs just like one uses
>> a non-polymorphic C++ class. If so, then that's super.
>
> I lost that perspective when criticizing RegExp, you're right. But still the
> API is lousy - every single time I am using a RegExp, I find myself fumbling
> through the thoroughly overlapping primitives in the documentation, and
> never seem to find an idiom that's simple, comfortable, and memorable.
Ok. I'm certainly not in love with the API either. Though, the only
RegEx API I've ever used that felt totally comfortable with was
Perl's, which in large part is syntax instead of an API. Python's
syntax I have to look over the documentation every time I use it, too.
Maybe it's because of the "matching" vs "searching" distinction that
I find impossible to remember.
(http://docs.python.org/library/re.html)
--bb
More information about the Digitalmars-d
mailing list