Apocalypse 5 Released
Simon Cozens writes "The Apocalypses are Larry Wall's explanation of the design of Perl 6. In Apocalypse 5, Larry turns to redesigning regular expressions. He set out to intentionally 'break' a lot of the regular expression culture we're all used to, and these are the results - and they're mindblowing."
Bah, and I've only just got the hang of em.
I hope somebody's going to write some automatic conversion tools because going back to one even a few days later is a hairy experience indeed.
[)amien
Hmm, from the 'BAD REQUEST' message I get on perl.com, I'd say they set out to intentionally break the Apache web serving culture we're used to also... :)
is competition good, or is duplication of effort bad?
Yes, we do need another regexp format. Larry spends several pages explaining why, if you'd read the article.
Furthermore, 80% of your existing Perl5 regexps will work unchanged in Perl6. *, +, *?, +?, (), ?, all unchanged. Most of the backslash-letter character classes, unchanged. Dot and ^ and $ are the same for most purposes, trivial to port when they aren't. 80% of the remaining cases can be ported by changing [] to <[]> and escaping spaces or replacing them with \s or \h (which they often should have been anyway).
I'd rather spend half an hour every fifteen years to learn something new than put up with the inferior old scheme for another decade or more. Unreadability of regexps is one of the biggest complaints people have about Perl, and this addresses those concerns head-on.
(Incidentally, people made all these same complaints the last time Perl changed regexps, when Perl5 came out. And now every other language in existence has recognized that