3 ms·
Amazing article, very good advice to keep your data structures flat. Adding to that, it also makes editing the AST vastly more efficient. I have discovered th
by cardanome 2y ago
Amazing article, very good advice to keep your data structures flat.
Adding to that, it also makes editing the AST vastly more efficient.
I have discovered that principle on my own when I worked on an editor that directly operated on the AST instead of text. I found manipulating the tree-style AST so painful, constantly traversing the tree and all. Once I made it flat, my life was a hell lot easier. You can just directly index any part of AST in linear time.