3 ms·
I agree with this, kind of. Though I've found that keeping useless tests around doesn't always have 0 cost, same for any dead code. Often, though, you can ver
by h0l0cube 6y ago
I agree with this, kind of. Though I've found that keeping useless tests around doesn't always have 0 cost, same for any dead code.
Often, though, you can verify that your code works using a REPL.
I'm also a huge fan of how doc-tests in some languages that make the tests are part of the documentation, and neatly 'cohere' them to the function itself. At which point I'm happy to leave them in, as the tests-as-documentation are harder to miss, and are actually instructive.