2 ms·
Tests assert correctness of behaviour, which is the only thing that really matters. A type system can't do that. Spending time getting your types right just to
by globular-toast 2y ago
Tests assert correctness of behaviour, which is the only thing that really matters. A type system can't do that. Spending time getting your types right just to please the type checker does catch some bugs sometimes, but I'm not convinced it's truly worth it given that bugs usually happen at a much higher level anyway which will lead to rewriting/throwing away the lower level code anyway.
It's a completely different tradeoff if those types are also being used to compile the program into native code. No C programmer complains about types because at least we're getting native code with zero overhead. It's a tradeoff that's worth making, sometimes. But there are so many cases where speed does not matter, and there it's much harder to make the case.
As always, it's not really about static vs dynamic, strong vs weak, red vs blue, left vs right etc. All have their virtues. The axis that really matters is extremity. Extreme adherence to anything is rarely a good thing.