Slashdot Mirror


Damian Conway Publishes Exegesis 5

prostoalex writes "Come gather round Mongers, whatever you code, And admit that your forehead's about to explode, 'Cos Perl patterns induce complete brain overload, If there's source code you should be maintainin', Then you better start learnin' Perl 6 patterns soon, For the regexes, they are a-changin'. This remix of Bob Dylan serves as an epigraph to Exegesis 5."

3 of 125 comments (clear)

  1. Re:skimmed the article by twoshortplanks · · Score: 5, Informative
    1. A regular expression is, and always will be, a way of creating a rule engine/fine-state machine. It's a type three grammer. There are simple maths proofs that can demonstrate this
    2. A finate state machine cannot match XML. XML requires you to have the ability to match the right number of opening and closing brackets (and to do that you need to be able to store the number you've seen somewhere.) This requires a push down automina - a stack machine - a type two grammer.
    3. Perl's "Regular Expressions" have been beond a true regular expression for quite a while now (see backreferences)
    4. Perl 6's rule system - let's dump the term regular expression now - is a further step in this complicated matching.
    5. Matching type two grammers - like Parse::RecDescent can - is a good thing.
    --
    -- Sorry, I can't think of anything funny to say here.
  2. Perl 6 will be largely backward compatible by barries · · Score: 5, Informative

    People--especially FUDchunkers--are missing the most important points:

    Almost all of the most useful Perl5 code of today will be runnable by Perl6 tomorrow: the compiler will fall back to perl5 and the VM is language neutral (even moreso that .NET it would seem).

    In addition to running most perl5 modules as-is, Perl6 matching rules will have a perl5 backwards compatability mode built in so you can continue using the Perl5 regular expressions you know and love from Perl, Java, and everywhere else that's adopted them as needed in Perl6 code.

    Yes, Perl6 is a rewrite and introduces a lot of deep CS concepts and ew syntax, but some care is being taken to assure that most Perl5 code will be runnable as is, while people learn about the power of some of the advanced tools Perl6 will provide.

    Please Don't Panic (or incite others to): the apocolypses and exegises are technical documents, they are not meant to be smooth, easy reading or to reassure today's perlers that their hard won skills will be useful. They're meant to describe what's new and different and usually why. Don't be scared by the new and different, just as with existing Perl, you should be able to adopt the powerful new concepts and syntax as you need to without having to swallow it whole or unlearn everything you already know.

    Perl6 will be stunningly more powerful, expressive, and provide (optionally) the safety features required for average coders to implement large systems while letting experts use extremely powerful tools like closures, continuations, intricate pattern matching that have mostly been accessible in academic languages to this point. And it will still allow convenient scripts to be generated if that's what you need to do.

    Remember folks, other languages can make shitty code smell nice, but it's still shitty code and you wouldn't want to eat^Wmaintain it.

    - Barrie

  3. Re:Ugh by jdavidb · · Score: 5, Informative

    You might want to have a look at this article which highlights some of the ways in which Perl 6 is not changing.