Query-based compilers apply incremental computation to compilation by tracking function call dependencies and recomputing only what changed. While elegant, this approach has fundamental limits: it cannot outperform the size of the change in output (the avalanche problem), adds profiling complexity, and introduces overhead even for potential dependencies. The author argues that query-based compilation should be a last resort, not a default. Zig's language design enables parallel, file-isolated parsing and name resolution without queries, while Rust's macro system and trait resolution force fine-grained dependency tracking from the start. An alternative to query-based maps is in-place diffing: compute what changed per file and apply a diff to a global structure, which Zig also plans to use for incremental linking.
Sort: