Re:L++ Language
by loumf on Wednesday May 07, 2014 @04:24PM
(#7712448)
It's more like, the text is easier to turn into an AST, and it's easier to manipulate that AST. It's not so much the parens, but the nested structure (and that all of the code is in that structure)
[ Parent
| on HN ]
> It's not so much the parens, but the nested structure (and that all of the code is in that structure)
I should have explained myself more clearly, I thought that the operator appearing at the beginning of the list means that operator precedence is no longer relevant. With infix operators the precedence is important.
Yes, this is also correct. In most (if not all) Lisps the generic structure is "(operator [arg1] [arg2] [...] [argn])".
Infix languages are trivial to parse; undergrad CS students typically do it the same week that they learn about parsing prefix and postfix languages.
What actually makes lisps easy to parse is a near complete absence of syntax; particularly structures/constructs that require considerable effort to disambiguate.