3 ms·
Shouldn't the structure of the expression tree correspond to the structure of the document macros? i.e. (begin document ...)
by formerly_proven 5y ago
Shouldn't the structure of the expression tree correspond to the structure of the document macros? i.e. (begin document ...)
- kazinator 5y agoMaybe, maybe not. Lisp files can have top-level structure (relationship between top-level forms). Like defining a class here, function there. This is the topic of a StackOverflow question: https://stackoverflow.com/questions/25720046/why-is-a-lisp-file-not-a-list-of-statements https://stackoverflow.com/questions/25720046/why-is-a-lisp-f... One advantage would be that the stuff between (begin document) and (end document) consists of multiple forms which are separately read, expanded and processed, which can be quite important in some situations. Also there is the possibility that some form in the document could load another file. (begin document) (load "boilerplate") ...