June 5th, 2002

Apocalypse now: Larry Wall blows up regular expressions

First: a confession.

I love Perl.

There's something in its elegant simplicity that just tweaks that aesthetic sense. It's, dare I say it, beautiful. And one of its most beautiful aspects are its regular expressions. Back in my ISP days I would spend hours sitting there tuning regular expressions so that they would sit up and beg, doing just what I wanted - no more, no less. And it's a language that works just the way I think. I can write a sentence in English and take it and turn it into Perl, and the code will do just what I described.

You can take your C#, take your Java. Just give me Perl...

The big event in the Perl world at the moment is the development of Perl 6. Unlike previous versions, this is a major rewrite, taking time to step back from what's already been done, to what can be done today. The basic philosophy of the redesign is wrapped in religious imagery - delivered in the form of apocalypses and exegises. So when I saw on Slashdot that Larry Wall's latest Perl Apocalypse was a rethinking of how my favourite feature would work in Perl 6, I decided to have a long look. It's a very interesting paper, that rethinks the way we pattern match in the light of the move from single-byte character coding (such as the familar ASCII) to multiple-byte character encodings (like Unicode). It's also a step back to the linguistic basis of pattern matching, trying to find a better way of describing patterns and structures.

There's something very interesting happening here. It's the development of a language tailored to how we at the start of the 21st century relate to the world, a language based on philosophy as much as mathematics.

Have I told you that I love Perl?
  • Current Music
    Mr C - Change - Hectic Times