Type System


Type System

A type is any piece of information we want to store about some variable, or expression. One way to think about it is that it's metadata.

Typing Rules are a set of rules that say how to tag variables and expressions with types in a way that is useful for the programmer to avoid bugs in their programs.

To create a type system, you need to create two things: 1. A type syntax, which specifies how a valid type looks like. 2. Typing rules, which specify how to type expressions and variables in a program.

Things you can model with types