🧭Type System
Also known as Type Checking, Type Checker
Rules that sort values into kinds. They check how each kind is used.
Think of it like
Think of it like shaped holes in a toy box. A square block will not go in the round hole.
Example
Lucy's code tries to add 5 to a list of names. Her type checker stops it before the program even starts.
Why it matters
Many bugs are a value of the wrong kind in the wrong place. A type system finds them for you.
Definition
Common mistake
Key takeaways
- 1Kinds of value. Number, text, list and more.
- 2Rules for each. What you may do with it.
- 3Checked early or late. Before running, or while running.