top | item 30359812

(no title)

saba2008 | 4 years ago

Somewhat related:

Perl Cannot Be Parsed: A Formal Proof (2008) https://news.ycombinator.com/item?id=5770531

discuss

order

rabbits77|4 years ago

Well, to be a little pedantic, Perl cannot be statically parsed, since some constructs require runtime context.

If it could not be parsed it could never work!

And this is totally OK in my book, I use Perl for prototyping ideas and an expressive language that allows creativity from me the programmer is a feature as it promotes looking at a problem from multiple aspects.

lmm|4 years ago

> Well, to be a little pedantic, Perl cannot be statically parsed, since some constructs require runtime context.

If you're going to be pedantic, it's important to be correct; there's no such thing as dynamic parsing.

> If it could not be parsed it could never work!

What's the logic here? An interpreter doesn't have to operate on an AST, a language doesn't have to have a nontrivial grammar (consider Brainfuck). Perl is just a language in the same category: it doesn't have a (true) nontrivial AST, it doesn't have a (true) nontrivial grammar, and it can't be (truly, nontrivially) parsed.

avgcorrection|4 years ago

“Cannot be X” most often means “in the general case”. (In the context of computability.)