How do you check if an expression is an int or string? How do we formally define a type system? How do we implement it in a compiler? All answered in this tutorial.
This post is split into 2 halves: the first half explains the theory behind type-checkers, and the second half gives you a detailed deep-dive into how it’s implemented in our compiler for our language Bolt. Even if you aren’t interested in writing your own language, the first half is useful if you’ve ever heard about type systems and want to know how they even work!
This thread was posted by one of our members via one of our news source trackers.