Stories
Slash Boxes
Comments
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

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by hossman (2110) on 2002.04.23 12:31 (#7391)
    Is anyone else concerned that just as the rest of the programming languages in the world are getting arround to including regex support in the core language (or core libraries), and doing so by adopting the exact same syntax as "perl regular expressions", perl regular expression syntax is changing?

    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.

    • In other words, Perl's regexps drive the other languages' implementations.

      Note that the new syntax is also there to allow more powerful, BNF-like, constructs.

      • In other words, Perl's regexps drive the other languages' implementations.

        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

        • In other words, Perl's regexps drive the other languages' implementations.

          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.

          They'll cope. :)

          The current regex syntax is past the point where adding new syntax is conceptually feasable.

          Also, if you rea

    • by erikharrison (2764) on 2002.04.24 9:51 (#7458)

      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.