Slashdot Mirror


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."

4 of 234 comments (clear)

  1. Re:Changing regular expressions? by tjwhaynes · · Score: 3, Informative

    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.

    Guess you haven't seen txt2regex? It doesn't support Perl 6 yet - but it supports about 20 languages at this point so I think you can reasonably expect to see more in the future :-)

    Cheers,

    Toby Haynes

    --
    Anything I post is strictly my own thoughts and doesn't necessarily have anything to do with the opinions of IBM.
  2. Re:Perl's had it's day - It's become like COBOL by ekidder · · Score: 5, Informative

    We use perl pretty much exclusively for my work (telecommunications company). It's not that we have inertia (in fact, the company standard is Java - ack), it's that we LIKE perl. It has the right combination of features that makes just about everyone in the group happy.

  3. Perl is mad powerful by Anonymous Coward · · Score: 1, Informative

    Why do people love it? It's mad powerful. Sure it can look like line noise, but once you start to "think" in Perl you can do amazing things with only a little code. And for many of us, we already "thought" in Perl anyhow. At least that's how it struck me. Perl's much more like a natural language than a lot of traditional programming languages, and this gives individual coders a lot of freedom in the way they do things. Of course it causes a lot of frustration for beginners and dabblers, too.

    (an example)

    exit(1) unless $input;

    You can do mad powerful things in Perl in just a few lines. Plus, there's CPAN which extends your power even more.

    Not that I suggest everybody should code in Perl, but those are the things that I think attract a lot of people to it.

  4. Re:Regex by jaffray · · Score: 5, Informative

    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 virtually every other popular language has recognized that the Perl5 design is better than its predecessors, and has adopted a Perl-compatible regular expression syntax or library. Larry's got a pretty good track record here.)

    (BTW, the preceding incomplete post was a slip of the mouse. Mods, please kill it.)