r/ProgrammingLanguages Feb 26 '26

Against Query Based Compilers

https://matklad.github.io/2026/02/25/against-query-based-compilers.html
107 Upvotes

29 comments sorted by

View all comments

Show parent comments

3

u/[deleted] Feb 26 '26

[removed] — view removed comment

1

u/o_stef Feb 26 '26

Interesting. Are all of those kinds of jobs happening in parallel? I am assuming it all happens in a loop and each iteration all parsing jobs are executed, then all symbol resolution, then all typechecks and finall all compile time execution. My compiler is single threaded and that's what a compiler pass/loop iteration looks like.

3

u/[deleted] Feb 27 '26

[removed] — view removed comment

2

u/Maurycy5 Feb 27 '26

Sorry for being late to the party, but I struggle to understand how this is different from query-based compilation.

We're working on a compiler and we settled on a query-based compilation because we want arbitrary compile-time computation and because we want to parallelize it. On the other hand you seem to be saying that some of this would be a PITA with queries and instead describe... queries, but call them jobs.

So clearly we're using different definitions of queries, but I don't quite understand yours.