← Back to context

Comment by jhgb

5 years ago

> I disagree. Parsing is the single most important feature of building a programming language. It influences how the language can be structured and also how it should be structured for performance reasons.

Wirth already settled that question (of both structuring the language and performance) with recursive descent over thirty years ago. The necessary treatment of all things parsing is then covered on twenty pages of his Compiler Construction text.

> Wirth already settled that question (of both structuring the language and performance) with recursive descent over thirty years ago.

"Recursive descent" is a whole class of parsing algorithms. Claiming that recursive descent settled the question is a kin to claim that compiled programming languages settled the question of how to develop programming languages.

Moreover, even if you go as far as believing that a specific class of parsing algorithms settled anything, it's absurd to argue that people who are learning how to write a parser should not learn about them, specially as your personal choice has fundamental limitations such as left-recursice operations and very specific techniques to mitigate them.

And finally, we still see articles being accepted into academic journals on how to parse concrete languages such as JSON. I'm sure we can agree that slapping together something with a random parser generator is not something that servers the students' best interests.

  • It turns out that whatever limitations there are to that approach hardly matter in practice, since Wirth developed a wide variety of languages this way, and they work just fine.

    • > It turns out that whatever limitations there are to that approach hardly matter in practice (...)

      How do you know if you do not learn about parsers?

      Do you see where I am going with this?

      It's absurd to claim that parsers are not fundamental and central to develop compilers. That statement is patently false, specially considering that some programming languages are notoriously challenging to parse.

      1 reply →