2 ms·
> E.g. the Lisp expression (+ a (* b b)), informally called a syntax tree, is actually a DAG That is a syntax tree. Syntactically it is a tree. The fact that y
by IshKebab 3y ago
> E.g. the Lisp expression (+ a (* b b)), informally called a syntax tree, is actually a DAG
That is a syntax tree. Syntactically it is a tree. The fact that you have a later step that recognises that the `b` identifiers refer to the same object and turn it into a DAG doesn't mean it isn't a tree initially.
- kazinator 3y agoMost of the time when the word "tree" is used in this context, it is in reference to that DAG, not the printed version. E.g. see the tree and tree-structure glossary entries in ANSI CL. https://www.lispworks.com/documentation/lw61/CLHS/Body/26_glo_t.htm https://www.lispworks.com/documentation/lw61/CLHS/Body/26_gl...