- Published on
Investigation · Part 10 of 10 · Types under the hood
Types as Proofs: What the Checker Knows That the Binary Forgets
Wrapping an f64 in a Meters type makes adding meters to seconds a compile error, and the optimized build merged the wrapped addition with the plain one into a single function. Then I fed the same function disguised bits and it computed a wrong answer without complaining. This is the last article of the series.