Hacker News new | ask | show | jobs
by hardburn 1052 days ago
Which also gives away some gaps in the author's knowledge.

Perl wasn't following the PCRE standard. It was the PCRE standard. Everything else was following it. Usually with some piece missing--far more implementations should have the /x modifier.

The Perl 6 design process didn't throw it away after 30 years. It threw it away with less than 10 years. There was already widespread knowledge that Perl had gone beyond "regular expressions", and IIRC, that was even before it had implemented recursive expressions. Perl 6 would be "patterns", and they would be good enough to be used as a full grammar. The language itself could be parsed in it, and Raku sometimes is, depending on the implementation.

3 comments

> For thirty years languages followed the PCRE "standard"

It says that (most) other languages followed the standard set by Perl 5, not that Perl followed the PCRE standard

Technically Perl 5 is parsable using Perl 5 regexes: https://www.youtube.com/watch?v=e1T7WbKox6s

But it is also true that Raku’s grammars were designed from the start to write real parsers in, whereas Perl 5’s regexes sort of gradually got that way.

> It was the PCRE standard

haha true

> The language itself could be parsed in it, and Raku sometimes is, depending on the implementation.

That's fantastic, didn't realize.