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.
Andrei