4 ms·
That's one thing I don't understand. The argument I hear against static typing is that it's too much work to write all this type metadata. But if you have to ma
by cm2187 9y ago
That's one thing I don't understand. The argument I hear against static typing is that it's too much work to write all this type metadata. But if you have to make up the lack of compiler checks with lots of tests for things that wouldn't require tests in a static language, we are not saving any work.
- mpweiher 9y agoThat's because you're not testing things that wouldn't require tests in a static language. You're testing things that need testing either way, and incidentally also testing the types.
- sidlls 9y agoNo, you're testing types and verifying the implementation details of the language. It's rare that a test for logic "incidentally" tests the type system. Usually both the logic and type checks are tested. It's just obfuscated because the bulk of the test is for checking the types and it's easy to look past that.
- mpweiher 9y agoYes, it doesn't test the "type system" (whatever that even means). However, it tests values for correctness. Values have types. So if you are testing whether something has the correct value, you are also testing implicitly that it has the correct type, because for the values to match, the types must also match.
- gt_ 9y agoI love Python but I also don’t mind static types. Maybe I will realize some day what this argument is really about, but I expected that day to come by now.