On 03/04/17 07:43 PM, Bart Schaefer wrote:
Certainly one approach would be to always use pcre when it is loaded, and always use regex when it is not, and only throw an error when neither of them is available. That would only introduce a problem if someone is expecting regex semantics out of a pattern that is valid in both cases but means something else in pcre semantics. I'm not going to give myself a headache trying to construct an example.
Pardon, I don't understand the details of any of this, but would not the above be setting a time-bomb? Surely it should be explicit which method is being used and one should never crash into something like: "Oh! I've been thinking I was using pcre all this time and now I see that it's really regex." or: "I want regex but since that's not available I'm getting pcre whether I want it or not, it seems." Friendly fall-backs might seem friendly, but if they are doing something without explicit approval or maybe explicit notification are they not gotchas waiting to sabotage you? This is one of my philosophical musings, just ignore it if it's not worth answering.