6 ms·
Silly Parens are easier to parse. Automated manipulation of programs might be fairly easy to accomplish. If there were Lisp-style Macros available, that would
by cjensen 12y ago
Silly Parens are easier to parse. Automated manipulation of programs might be fairly easy to accomplish.
If there were Lisp-style Macros available, that would beat the pants off the C Preprocessor for boilerplate.
- NAFV_P 12y ago> Silly Parens are easier to parse. I thought silly parentheses are just as easy to parse as in an imperative language like C. Are you referring to the Polish prefix form being easy to parse?
- loumf 12y agoIt'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)
- NAFV_P 12y ago> 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.
- aerique 12y agoYes, this is also correct. In most (if not all) Lisps the generic structure is "(operator [arg1] [arg2] [...] [argn])".
- Crito 12y agoInfix 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.
- endeavour 12y agoWho cares how hard a language is to parse if a parser exists?
- ktg 12y agov0.2: Macros are supported via Racket's macro system define-syntax.