Hacker News new | ask | show | jobs
by wnewman 4237 days ago
Also, the language syntax is (basically) designed to be parsed in a trivially obvious way into the internal "list" (really tree, with lists as a common special case) data structure. This lets the friction of writing macros which work with code (or with structured data) be very low: the macro logic that you write is fed that parsed list and works with it directly, skipping the usual glue logic for telling a parser how to cope with syntax for a language extension.

(The "basically" caveat above is because some Lisps honor this code-is-a-list principle more than others. E.g., I have seen remarks about how modern Schemes have moved away from it at least a little bit, with syntax which is importantly not quite a list, though I don't know any of the details. And CL has other kinds of reader magic --- like one-character "reader macros" and like the implicit package which is used as a default for symbols at read time when no explicit package is given --- that can in principle complicate the obvious 1-1 correspondence between source and parsed-as-list representation, although in practice that magic is very seldom used in such a way that you need to think about it.)