5 ms·
They don't solve the same problem though. All static typing does is make sure you don't have any type mismatches. Sure, it helps enforce assertions about your i
by texel 17y ago
They don't solve the same problem though. All static typing does is make sure you don't have any type mismatches. Sure, it helps enforce assertions about your inputs and outputs, but there are a million ways your code can compile without issue and then proceed to fail spectacularly. The fact that, as this article states, tests are optional is another issue entirely, but it doesn't change the fact that static typing is only useful up to a point.
- j_baker 17y agoI don't know where you seem to be getting that I am for static typing. In fact, what you say about static typing only being useful up to a point is exactly what I was getting at. Neither way is perfect to remove bugs from your programs.
- texel 17y agoI don't think I made any assumptions about your feelings on static vs. dynamic typing, I'm just pointing out that even though on the surface they can be both used to solve similar superficial problems, static typing is woefully limited with regard to the scope of problems it can actually detect. Tests can go way farther to help verify the expected results of your code.
- j_baker 17y ago"Tests can go way farther to help verify the expected results of your code." This is definitely debatable, but I think we should agree to disagree at this point.