Caterpillar

Daily Thought - 2024-07-29

< back to list

So what does it mean to have a code database? It means that the canonical version of your code, what you store in your version control system, is not plain text files, but a structured database. A plain text representation of the code can still exist, as an input format for the developer, but what gets stored is structured data that is already parsed and partially compiled.

Inference of types, effects, and other information, can happen during that partial compilation step. Meaning the inferred information is stored in the code database. If you modify the code, and that results in a change to an inferred type, that change shows up in the diff of your commit.

There's also a performance benefit. The code database serves as a cache. Every build becomes an incremental build; even the initial build after you clone a repository. (Although that doesn't include any compilation steps that happen afterwards, like code generation for the target platform. I don't know yet, how that is going to fit into the bigger picture.)

<< previous thoughtnext thought >>