This video is available to students only

When to use AST-based tooling

A rough formula to determine when to use AST-based tooling

Determining when to use an AST-based tool can be equally as important as understanding the tools themselves.

In practice, AST-based tooling is most useful when working with large codebases (hundreds of files or more) and when targeting code that follows a similar pattern. In smaller codebases, it's easy to manually update things across several files, or use a find/replace tool for simpler renamings. In a large codebase, it could take days or longer to make manual changes, depending on the exact change. Potentially more concerning is that with so many repetitive changes, the chance of making a mistake increases.

AST-based tooling enables maintenance and refactoring "at scale."

 

This page is a preview of Practical Abstract Syntax Trees

Start a new discussion. All notification go to the author.