15312 Foundations Of Programming Languages 〈2K〉

If a program has a certain type and takes a step of execution, it must still have that same type.

let identity x = x

You begin to view types as a "logic" that catches bugs at compile-time rather than at 3:00 AM in production. 15312 foundations of programming languages

The formal logic behind garbage collection and resource allocation. 4. The Safety Theorem If a program has a certain type and

The simplest model is the —a mapping from memory locations to values. Adding assignment ( x := e ) changes the store. But it breaks referential transparency: x + x is no longer guaranteed to equal 2*x if x changes between evaluations. 15312 foundations of programming languages