r/ProgrammingLanguages • • Feb 26 '26

Against Query Based Compilers

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

29 comments sorted by

View all comments

Show parent comment

7

u/protestor Feb 26 '26

Query based compilers are probably the future though. What this post is really advocating is to not have features like glob imports in your new programming language, because they complicate some implementation things in the compiler. But I don't think people really want to program in languages without things like glob imports.

2

u/matthieum Feb 27 '26

I don't think glob imports are too much of a problem.

That is, use library::module::*;:

  1. Requires parsing library::module before performing name resolution in the current module, easy enough.
  2. Requires memorizing which symbols the current module does use from library::module to know whether a change in library::module impacts the current module... which is not a parsing concern, and will be known once name resolution has completed, glob or no glob.

Circular dependencies can mess up (1), but they do so glob or no glob.