- Published on
Investigation · Part 1 of 10 · Types under the hood
What Is a Type? A Set of Values, a Promise About Operations, or Both
I took one small type, Human = man or woman, and compiled it in TypeScript, Rust, and C to see what stays of it. A type is a set of allowed values plus a set of allowed operations, both checked once, and neither reaches the processor.