You heard it here first! I've been checking Perl.com more than usual this week since I found out last week that the next apocalypse was due this week. Here, for your enlightenment, on a topic near and dear to Perl enthusiasts everywhere, is Larry Wall's Apocalypse 5: Regular Expressions.
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.
For prior Apocalypses, I've used the RFCs as a springboard for discussion of my thinking, but this one is special, because none of the RFCs were courageous enough (or foolhardy enough) to look at the big picture and propose radical change where it's needed. But Perl has often been tagged as a language in which it's easy to write programs that are difficult to read, and it's no secret that regular expression syntax that has been the chief culprit. Funny that other languages have been borrowing Perl's regular expressions as fast as they can...
Given all this, I need to warn you that this Apocalypse is going to be somewhat radical. We'll be proposing changes to certain "sacred" features of regex culture, and this is guaranteed to result in future shock for some of our more conservative citizens. Do not be alarmed. We will provide ways for you to continue programming in old-fashioned regular expressions if you desire. But I hope that once you've thought about it a little and worked through some examples, you'll like most of the changes we're proposing here.
Wow, and the thing is 24 pages according to the way Perl.com breaks it up, but it's about 50 pages printed.
Feel free to post a comment below. Please see my comment policy.
Formatting Rules (No HTML):