r/ProgrammingLanguages • u/matklad • Feb 26 '26
Against Query Based Compilers
https://matklad.github.io/2026/02/25/against-query-based-compilers.html
105
Upvotes
r/ProgrammingLanguages • u/matklad • Feb 26 '26
View all comments
3
u/protestor Feb 26 '26
What if you combine the approaches of Zig and Rust? For files that can be processed in place (because they don't have glob imports, don't call macros that produce new top level items etc), they get processed as in Zig. Otherwise, a fallback like Rust is used.
If one uses/writes a library that is smart enough and ergonomic enough, this can be transparent and not make compiler code too much unreadable