Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Issue with reusing AST nodes #6375
referenced this issue
Oct 3, 2017
It's more complicated than I thought, the traverse algorithm is not easy to understand.
I wanted to use Immutable.js with a tree datastructure.
I don't know what we would do with mutations like:
I've looked into OCaml and GHC, both compiler are self-hosted and uses an immutable tree. They are fast enough to not need to merge visitors and only use
@loganfsmyth had ideas a long time ago: https://github.com/babel/notes/blob/master/2016/2016-08/august-01.md#potential-api-changes-for-traversal around this.
And yes we would have to prevent assignment and only allow path methods