|
From: | Paul Eggert |
Subject: | Re: :alnum: broken? |
Date: | Fri, 28 Feb 2020 00:48:32 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
On 2/28/20 12:09 AM, Eli Zaretskii wrote:
I don't believe it is right for us to reject questionable but valid code.
That begs the question. The code is valid only if we continue to insist that it be valid, despite the clear drawbacks of doing so. Instead, we can easily change the definition of Emacs regular expressions so that the code is invalid. Since such code is invariably a mistake, it's a win to make such a change. That's what GNU grep has done for many years, and it works.
I can even agree to reject this at run time under a non-default value of some special variable
That would be better than nothing, but it's not very good since most people won't know about the variable and thus will continue to suffer from these errors. Better would be to make the default reject these buggy regexps, which is what GNU grep does (it accepts the buggy regexps only if POSIXLY_CORRECT is set).
[Prev in Thread] | Current Thread | [Next in Thread] |