3 ms·
Typically my strategy is: 1) Make types explicit (or generic) at any interface boundary 2) Periodically query the inferred types of things from my editor just
by _bxg1 7y ago
Typically my strategy is:
1) Make types explicit (or generic) at any interface boundary
2) Periodically query the inferred types of things from my editor just to make sure they come out to what I expect
3) If an error message feels like it's in the wrong place or an inferred type isn't what it should be, progressively make things more explicit until the problem is resolved
But you're right, that's all very subjective and dependent on learned norms.
- lonelappde 7y agoThis is the same strategy I use for writing tests. This is natural, because types are compile-time tests.