Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×
Perl Programming

Damian Conway Publishes Exegesis 5 125

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."
This discussion has been archived. No new comments can be posted.

Damian Conway Publishes Exegesis 5

Comments Filter:
  • by IpalindromeI ( 515070 ) on Friday August 23, 2002 @08:54AM (#4125671) Journal
    It does kind of feel that way. Since all previous versions have worried much about maintaining backward compatibility, a lot of new stuff has been added without removing the old stuff (merely deprecating it). Because of the "history" behind things. With Perl6, though, they're ripping everything apart and rebuilding it from scratch, using the experience and wisdom that have been gained over the years. What was good and we'd like to keep? What was bad and should be done away with? What was a nice concept but implemented poorly? These are the questions the designers are asking themselves. I think something people are dreading is that since this is a total rewrite, looking more towards Doing It Right than making sure it still works like it used to, there will be much to relearn. But personally I'm glad they decided to do it this way, because it means they can do exciting things, and get rid of annoying things, and not have to worry about the compatibility. In the end, I think it will turn out to be a much cleaner, more consistent, more powerful, and even friendlier Perl. It will be like a breath of fresh air, and each Apocalypse gives more to be excited about.
  • by Anonymous Coward on Friday August 23, 2002 @09:03AM (#4125701)
    I think a syntax change is necessary - this new stuff is so NOT _regular_ expressions. If you want a regex, use the Perl 5 regex constructs (although technically they're far from regular too).

    This is standardising cutting-edge (even compared to most lisp + prolog AI-related parsing stuff, and that's always ad-hoc) parser as part of the standard language.
  • Re:Ugh (Score:3, Insightful)

    by Dom2 ( 838 ) on Friday August 23, 2002 @09:05AM (#4125705) Homepage

    If you don't like it, you don't have to port it.

    There are still people using emacs 18 to edit their files because it's small and it works.

    There are still people running Windows 98 to run their games because it works.

    Nobody's forcing you to move to Perl 6. That's the beauty of Open Source. Perl 5 is going to be developed for a long time to come. Don't give up hope.

    -Dom

  • by john_roth ( 595710 ) on Friday August 23, 2002 @09:14AM (#4125731)
    couldn't they have been gentler? However, if it lets me handle HTML easily, without having to learn all kinds of packages that do lots of things I don't need, then I'm all for it. John Roth Watch that speed limit sign on the learning curve!
  • Beautiful! (Score:3, Insightful)

    by soboroff ( 91667 ) on Friday August 23, 2002 @09:20AM (#4125755)
    I only had time to skim the article, and anyway it would take anyone a while to absorb all that code. Here's the short summary:

    Regex's in Perl have accumulated too much cruft to be called regular expressions anymore. So now they're full grammers.

    That's right. Now you can pattern match with a very readable grammer syntax that is easily decorated with Perl code to do parsing. YACC for Perl. You can find packages for this on CPAN, but this is integrated with the language.

    No whining about the bad old days of Perl regex syntax for me... now I'm actually excited by the prospect of needing to buy a new llama book.
  • by Anonymous Coward on Friday August 23, 2002 @09:38AM (#4125835)
    Except that compatability modes rarely are. And if they are, they're not maintained for long.
  • DON'T PANIC (Score:1, Insightful)

    by Anonymous Coward on Friday August 23, 2002 @11:23AM (#4126539)
    Here's why I'm not panicking. I read the apocalypse, and realized that I've never used any of the (?.....) expressions in a regular expression, and I've been Perling for 4 years and have written 2 formal parsing modules, and scads of scriptlets to pull data from very loosely formatted files.

    I'm glad that support for the /x flag is improving, but I'm ignoring most of apocalypse 5 (until I find that I need advanced parsing capabilities), relying on the assurances that most of what I do with regexes will be preserved, and happily awaiting topicalizers and hyper operators
  • by mshomphe ( 106567 ) on Friday August 23, 2002 @11:36AM (#4126643) Homepage Journal
    Perl is like the castle built by the king in Monty Python and the Holy Grail, that fell over and sank into the swamp. So he built another one. And that fell over and sank into the swamp too. And then he built another and another, and they all fell over and sank into the swamp. Then finally, he built a really big one, and that burned down, fell over, and sank into the swamp.

    Don't forget, the last one stayed up. And it was the strongest castle in all of Britian.
  • by Camel Pilot ( 78781 ) on Friday August 23, 2002 @12:31PM (#4127074) Homepage Journal
    You are upset that Perl 6 is changing significantly enough that you feel it could be classified as a different language. And you don't want to learn a new language so to solve your dilemma you are going to learn a different language? :)
  • by IssaFerret ( 252119 ) on Friday August 23, 2002 @12:35PM (#4127121)
    The problem is, really, that Perl 5 and Perl 6 are two completely separate languages. You shouldn't even bother thinking about backwards compatibility; the developers aren't. Larry stepped on that before much of anything else.

    From what I've read, Regexen are staying _basically_ similar (basically), but Damian Conway being the sick evil bastard he is, they're going to incorporate some higher capabilities into the engine that look an awful lot like his Parse::RecDescent [cpan.org] grammar parsing module.

    I mean, really, at their base, he's moving around flags a little, making whitespace default insignificant, and tinkering a few flags. It's when he starts making rules and backtracking capabilities (which exist in the current language, in clunky form, as he demonstrated) that it starts getting wacky.

    What it comes down to, though, is that noone should be thinking 'Oh, man, now I'll have to port all my perl to perl 6.', because Perl 5 isn't going to die out or anything, just get phased out like perl 4 - left at a stable rev for support purposes.

I've noticed several design suggestions in your code.

Working...