by ReflectedImage · 4y ago · 0 comments
You need unit tests to confirm the correctness of your program. And unit tests check most of the types for free. So you don't need static typing after all.
Great for readability when I'm wondering what type this parameter is supposed to be and what I can do with it.
You can obviously have documentation of types without static types, but static typing means you have ever-present compiler-verified documentation of types. Not always enough, but it's a lot more helpful than just having nothing.
Having exhaustive unit tests doesn't necessarily help with this.