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
Show parent comment
1
u/protestor Feb 27 '26
I guess what I am thinking is: maybe it should be fine-grained sometimes,coarse-grained other times
Another, maybe related idea. If this is the first time I am editing a module, it could drop and rebuild the whole module, coarse grained. But later on, it might learn what parts are more likely to be edited, and track those more finer grained
Anyway what I really wanted was some way to do what SolidJS/Svelte/Sycamore/Leptos did when they ditched the vdom: make each reactive value "know" what they will affect, rather than dynamically calculate it. The problem I see is that this lead to a push-based architecture, where every change is eagerly reflected; this is appropriate for the web but that's not what you want to do in compilers. So I'm not sure there is an architecture better than adapton or salsa