[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: :alnum: broken?

From: Mattias Engdegård
Subject: Re: :alnum: broken?
Date: Sun, 23 Feb 2020 19:40:30 +0100

23 feb. 2020 kl. 19.13 skrev Paul Eggert <address@hidden>:

> I understand the objection, but the check is not unsound. The syntax of 
> regexps was not carved in stone by God. It is something that we decide, and 
> we can change our minds if the change would be an overall win, as it would be 
> if Emacs behaved like Grep.

We seem to be in full agreement. (I meant incomplete rather than unsound, of 
course, and you were graceful enough to understand that.)

> The byte-compiler could warn about some of these blunders and if someone 
> wants to change the byte-compiler to do that, it would be an improvement. 
> However, this would necessarily either cry wolf or let blunders through, 
> because the byte-compiler cannot reliably determine whether a string will be 
> used as a regular expression.

Quite, it would be rather elaborate code for finding a small subset of what 
relint does. In contrast, doing it in the regexp compiler is both simple and 
accurate, although only mistakes encountered dynamically are found.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]