4 ms·
This is basically the other extreme. Why must we pick a side? Static types are useful. Unit tests are useful. One of my projects involves a bunch of graphics c
by jakelazaroff 6y ago
This is basically the other extreme. Why must we pick a side? Static types are useful. Unit tests are useful.
One of my projects involves a bunch of graphics code. A lot of tricky math and special cases. When I was trying to refactor that code, I added a bunch of unit tests to make sure images would continue to be rendered correctly. And they prevented me from shipping a bunch of rendering bugs! Bugs that the type system would have let slip through, because the function signatures didn't change.
- nightowl_games 6y ago> This is basically the other extreme. Why must we pick a side? Static types are useful. Unit tests are useful. I did not say that Unit Tests are not useful. I am merely proposing that they are less useful than Static Typing and hypothesizing on why TDD is common, and commenting on my experience with TDD evangelists. I agree that Unit Tests are useful and valuable.
- commandlinefan 6y ago> Static types are useful. Unit tests are useful. And unit tests with static types are even more useful still!