Idle thought: you can view a type system as just an abstract interpretation of code. `x = 1` can be abstracted as assuming that x is a number, then checking that numbers are appropriate wherever x is used.
Related Posts
Shower thought: using a tool like cargo-semver, could you build a package registry where the uploader never chooses the version number?
E.g. your last release was 5.2025-09-13 and you've just changed a type, so today's release is 6.2025-11-05.
Really cute approach to reporting type errors: when there's a type error, show an example of a runtime error that the type check has prevented!
Data-Driven Techniques for Type Error Diagnosis https://escholarship.org/uc/item/59s4h4pv
I'm having fun writing a simple type checker, but I'm learning firsthand why syntax-directed checking doesn't work. It prevents inference.
My checker catches real bugs, but it can't handle cases like this:
[1, 2].map(fun(x) { x + 1; })
I think I need bidirectional checking.