4 ms·
Regular expressions are a very obviously inefficient and confusing syntax, full of incidental complexity, and to make matters worse, they’re often a bit less po
by jacobolus 11y ago
Regular expressions are a very obviously inefficient and confusing syntax, full of incidental complexity, and to make matters worse, they’re often a bit less powerful than we want them to be.
The best summary of the problems I’ve seen is from Larry Wall, highly recommended if you haven’t read it before.
First half of this page: http://perl6.org/archive/doc/design/apo/A05.html http://perl6.org/archive/doc/design/apo/A05.html
Unfortunately, I think at this point regular expressions are too firmly entrenched in too many places to properly replace.
- masukomi 11y agoThey are not obviously inefficient and confusing. Many of us, especially the Perl geeks, find them relatively clear when well written. It's a mini language, and like any language it can be clear or opaque in its meaning depending on the skill and intention of the creator.
- raiph 11y agoFrom the preamble of the page you linked: > In fact, regular expression culture is a mess, and I share some of the blame for making it that way. Since my mother always told me to clean up my own messes, I suppose I'll have to do just that. So Larry aimed to do better in Perl 6. Do you think he is as good at solving problems as he is at identifying them -- or more specifically, what do you think of the "Rules" system[1] he came up with for Perl 6? [1] https://en.wikipedia.org/wiki/Perl_6_rules https://en.wikipedia.org/wiki/Perl_6_rules