emacs-devel
[Top][All Lists]
Advanced

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

Re: modern regexes in emacs


From: Jay Kamat
Subject: Re: modern regexes in emacs
Date: Fri, 15 Feb 2019 18:44:27 -0800
User-agent: mu4e 1.0; emacs 26.1

Perry E. Metzger writes:

> Other people get to pick what they want, too.

> If you don't want to let other people get the option of using
> the modern syntax, that's not demanding the right to use the old one,
> which won't be taken from you, that's demanding the right to keep
> other people from using the reasonable modern syntax. I think that's
> unreasonable.

I suppose you didn't read my previous mail past the first sentence, so I'll
quote it below for convenience:

>> I started using Emacs less than 4 years ago (so I could probably consider 
>> myself a 'modern user'), and I honestly find the new syntax much more 
>> confusing. I have never used the flags in those programs to get the new 
>> syntax, and I have seen those flags in a shrinking minority of shell 
>> scripts. I find the new syntax much more unreadable and arcane than the 
>> original, although the original is difficult by itself.
>>
>> I don't oppose adding more syntaxes, but I will never willingly use the new 
>> format personally.

Although, now that you've proposed it, a world where everyone must use rx does
sound very nice :).

I haven't read too much in the regexp code of Emacs, but it might be easier to
maintain one 'core' regexp language and translate 'alternative syntaxes' down
to some form of common representation. It would also be nice to provide some
facility for writing your own regexp flavor (Extended, Basic, Perl, Fixed,
<whatever's 'modern' in 50 years>) and integrating it into Emacs. Because of
that, I think it would be a good idea to make whatever interface used support
multiple possible flavors. I don't think that can easily be done with multiple
standalone functions (by itself). It would also be nice to have some facility
to pre 'compile' down to the intermediate representation ahead of time for
performance reasons (if it's not all implemented via macros like rx is).

-Jay



reply via email to

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