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.
Regexps as... XML! (Score:5, Funny)
And instead we can have beautiful XML regexps like:
(and yes, I'm just kidding)
Reply to This
We knew you were kidding... (Score:3, Funny)
This, or something like it, was my April Fool's joke for this year. The scary thing was it turned out to mirror a real proposal for XML regexes...
Re:Regexps as... XML! (Score:1)
Re:Regexps as... XML! (Score:3, Funny)
--Nat
Re:Regexps as... XML! (Score:4, Funny)
Reply to This
Parent
Re:Regexps as... XML! (Score:3, Funny)
Re:Regexps as... XML! (Score:2)
Re:Regexps as... XML! (Score:2, Informative)
Re:Regexps as... XML! (Score:1)
Re:Regexps as... XML! (Score:1)
Re:Regexps as... XML! (Score:2)
*shrug*, it's no bigger or smaller a concern for me than the entire thing that is Perl6.
Re:Regexps as... XML! (Score:1)
-matt
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)
Not to sound negative, but... (Score:1)
I haven't read all the docs by Wall and Conway, but from what I have read, none of it looks like the perl I know and love.
Why not give a wholly new name and make a clean break?
Re:Not to sound negative, but... (Score:4, Insightful)
Reply to This
Parent
Re:Not to sound negative, but... (Score:3, Insightful)
I've argued that this language is still Perl in the sense that the code (as Piers says above) still feels a lot like Perl. Remember that the stuff always being talked about are the differences not what has stayed the same.
I've argued (recently, with limited success) that Perl 6 is Perl because Perl is the community and the devlopers, not any one bit of software or code.
However, I've also argued quite a lot that maybe it should have a different name (if just
Re:Not to sound negative, but... (Score:3, Informative)
The Apocalypses and Exegeses can easily give that impression. But so can reading perldelta for any particular release of Perl 5. And the reason is the same: those documents are all about what is changing, and rarely mention what is staying the same (because then they'd be 10 times longer!)
But Perl 6 really is Perl. It feels like Perl to program in, and most of its syntax and semantics are identical to those of Perl 5.
It's like the
Re:Not to sound negative, but... (Score:1)
Good article. It eliminated my trepidation about perl6. Now that I have a new eye to the changes, I'll have to read the Apocalyse and Exegesis docs in earnest.
Thanks!
Further updates (Score:1)
Some of the more interesting things on the list recently:
* Precedence will be a property that you can manipulate for your subroutines.
* String interpolation will likely get some kind of overhaul based on the results of the regexp work.
There's a lot of other stuff, but I have work to do
Yet Another Just another perl hacker,