3 ms·
By the way notice the tree keeps reoccurring in other case of interfaces: - All computer languages are code, which expresses a set of nested statements and exp
by slver 5y ago
By the way notice the tree keeps reoccurring in other case of interfaces:
- All computer languages are code, which expresses a set of nested statements and expressions (which form a syntax tree).
- While XML was replaced with JSON for data exchange, that's also a tree, not a graph (some implementations exist to describe a graph, but I'd argue that doesn't help serialization etc. concerns).
There's something about a tree that makes it very suitable both for computer and human comprehension.
OF COURSE, all those trees end up describing graphs. Say our "syntax tree" at runtime is an object graph and so on. But it's notable that we describe that object graph by encoding it into a tree of rules.