Daily Thought - 2024-07-29
Hey, I'm Hanno! These are my daily thoughts on Crosscut, the programming language I'm creating. If you have any questions, comments, or feedback, please get in touch!
This thought was published before Crosscut was called Crosscut! If it refers to "Caterpillar", that is the old name, just so you know.
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.)
Hey, you! Want to subscribe to my daily thoughts? Just let me know (maybe include a nice message, if you're up for it), and I'll send you an email whenever I post a new one.