NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
forking the world again? (Score:5, Interesting)
I mean, it's the nature of things to change, but we're not going to win over converts from other languages if they have to learn all new regex syntax to use perl 6.
Reply to This
Re:forking the world again? (Score:2, Insightful)
Note that the new syntax is also there to allow more powerful, BNF-like, constructs.
Re:forking the world again? (Score:2)
Yes, but if all those millions of young'ns out there that only know java, and are just now learning the wonders of regexps read about "Perl regular expressions" in their javadocs, and then try to use perl6 and discover that the syntax has completely changed, they aren't going to be eager to figure it out.
Note that the new syntax is also there to allow more powerful, BNF-like, constructs.
Don't get me wrong, I'd love if if Perl ma
Re:forking the world again? (Score:3, Interesting)
They'll cope. :)
The current regex syntax is past the point where adding new syntax is conceptually feasable.
Also, if you rea
Recursive regexes (Score:1)
Re:forking the world again? (Score:4, Insightful)
Adding constructs to the current regex syntax has been difficult - not impossible, but the (?x . . .) syntax is incredibly strained. As such the syntax needs a change, and I would argue that since Perl is so widely known for being innovative in it's regexes that we should be willing to take the plunge to change it, should it be necessary.
One of the things Larry has pointed out over the perl6-language list is that Perl isn't realy good at writing parsers. We can write lexers and tokenizers pretty well, but true parsers are non trivial. This is a strange weakness for a text processing language.
The angles getting new uses enhances Perl regexes wihtout breaking to much. Newbies Perl 5 regexes will port with only some backslashes to keep tags kosher, most of the time. If we are worried about the newbies, it should be pointed out that at the basic level regexes do what they always did.
/start(.*)stop/; print $1;still does what we expect. Few languages offer 'Perl compatible Regexes', but plenty offer 'Perl like regexes'. We're gonna have to teach the Java Junkies they can't && their character classes anyway, so why not teach them about angles?All in all I find that interlanguage communication shouldn't be a reason to disapprove of Larry's changes. The only case where I'd be worried is Python, and that is because Guido himself asked p5p about whether or not certain syntax would be used so that Python could extend Perl's regex abilities a little. Since they are the only ones that asked, they're the only ones I'm worried about. As I said before, if everyone agrees that Perl is king of regexes, then we shouldn't let that fame prevent us from enhancing our regex syntax and ability.
Reply to This
Parent
Re:forking the world again? (Score:1)