emacs-devel
[Top][All Lists]
Advanced

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

Re: modern regexes in emacs


From: Alan Mackenzie
Subject: Re: modern regexes in emacs
Date: Fri, 15 Feb 2019 19:14:47 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

Hello, Eli.

On Fri, Feb 15, 2019 at 20:36:13 +0200, Eli Zaretskii wrote:
> > Date: Fri, 15 Feb 2019 17:54:05 +0000
> > From: Alan Mackenzie <address@hidden>
> > Cc: Mattias Engdegård <address@hidden>, address@hidden,
> >     address@hidden, Philippe Vaucher <address@hidden>,
> >     address@hidden, Eli Zaretskii <address@hidden>

> > > Anyway, I recommend Eli's approach. We create a parallel set of
> > > modernized syntax functions, and people can slowly adopt them.

> > I suggest we retain our current regexp notation, together with compatible
> > tools, as the sole way of writing regexps in Emacs.  This notation is not
> > all that bad, and it is thoroughly documented and well tested.  It's the
> > approach which will cause the least confusion.  It works.

> I proposed to have a separate set of functions that will accept PCRE
> syntax.  That would allow everyone to have what they want: you to use
> the "classic" regexps, and those who want PCRE to have that.  Where's
> the problem with that?

This will end up with a mixture of the two incompatible styles of regexp
in the Emacs sources.  I can see there being such a mixture even within
single source files.  This will be confusing to everybody, particularly
to beginners.

Regexps are difficult.  Whether one has to escape a literal parenthesis,
or a parenthesis used as a grouping token makes little difference, IMAO,
to the overall difficulty of regexps.

And we will have yet one more technical choice where "modernists" will
attempt to force "traditionalists" to do what the "modernists" want.
This was even explicit in somebody's post in this thread (though they
pretended that it would just happen without force).

I think the costs of an alternative regexp style will outweight any
benefits, and this will affect everybody, not just those in favour of
some alternative style.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

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