4 ms·
Great writeup on query-based compilers! though I think the signal comparison is a bit misleading. The defining feature of signal is automatic push propagation,
by hugiex 10mo ago
Great writeup on query-based compilers! though I think the signal comparison is a bit misleading.
The defining feature of signal is automatic push propagation, change a source, updates flow through dependencies automatically. Query-based compilers don't have this at all. When an input changes, nothing happens until you explicitly re-query.
What you've described is really sophisticated memoization with smart cache invalidation (revisions, one-way dependency tracking and stuff), not reactive propagation. Both solve incremental computation, but through fundamentally different mechanisms: push-based reactivity vs pull-based lazy evaluation.
Still a great post on modern compiler architecture though! many thanks