in reply to Perl6 Grammars

I read the exergises 5, and the examples comparing the perl5 way with the perl6 way, and thought "What's the big deal? The perl6 regexes aren't much shorter".

Abigail

Replies are listed 'Best First'.
Re^2: Perl6 Grammars
by Aristotle (Chancellor) on Sep 24, 2002 at 13:12 UTC

    No, they will probably even tend to be longer due to defaulting to /x.

    Seems what Larry was after is readability and extensibility though. Writing complex parsers that need to chain multiple regexes is not exactly trivial in Perl5, possible as it may be. The big deal with Perl6 patterns is the fact that they get promoted to actual control flow structures in and of themselves, and that interdependent groups of regexen get to enjoy the same benefits as classes/objects already do.

    Makeshifts last the longest.

Re: Re: Perl6 Grammars
by Anonymous Monk on Sep 24, 2002 at 17:34 UTC
    Someone in perl6-language pointed that out a few weeks ago and suggested a few changes. None of the replies agreed with it though. They don't realize character classes outnumber closures 100 to 1...
      They don't realize character classes outnumber closures 100 to 1...
      From what I gather, the issue here is mostly Unicode -- literal character classes are a bad idea with Unicode data, so making them longer, and in effect discouraging their use, isn't considered a bad thing. This assumes, of course, that a significant number of people actually use non-ASCII a significant amount of the time. I really don't have the experience to comment on this last assumption.

      /s