|
|
|
|
|
by chubot
3419 days ago
|
|
The sibling post says that they have both || and |. The || operator sounds like ordered choice from PEGs, and | sounds like a non-deterministic choice from regexes and CFGs. So it's basically a mix of paradigms, which muddies the waters in terms of what computational complexity guarantees you can get. Pure regular expressions can be matched in linear time; CFGs in cubic time and some subsets in linear time; packrat parsing in linear time, and backtracking PEG in exponential time. Perl 5 regexes are exponential time in general. I've used regexes extensively on big data so I don't like this mix of paradigms. I'd rather have separate dialects for each paradigm than having to guess what it's using underneath. Backtracking causes real problems in production: https://news.ycombinator.com/item?id=12132045 I would bet money that Perl 6 uses backtracking, because it has a mix of paradigms that makes it harder to do anything smarter. Backtracking is also bad for adversarial input, which is essentially always a concern nowadays. |
|
Please do have a play some time and assuming that I got the above right, donate however much money you would've been willing to bet to the Perl Foundation or the Enlightened Perl Organisation as you prefer :)