I used to treat types as paperwork.
Hoops to jump through to make the thing run.
Now I see them as promises
I get to keep before the code even runs.
A good type says what’s allowed
and quietly forbids the rest.
The whole class of mistakes
just becomes impossible.
The signature tells the next reader
exactly what goes in and what comes out —
a contract, checked for free.
Vague types push the surprises to runtime,
which means to production,
which means to a bad afternoon.
I’d rather make the promise up front
and let the compiler hold me to it.
– Serguey Asael Shinder
Leave a comment