5 ms·
> but a human still has to read that code and make sure that it does what you think it does. Why not just write tests instead? If you have 100% test coverage,
by braindead_in 3y ago
> but a human still has to read that code and make sure that it does what you think it does.
Why not just write tests instead? If you have 100% test coverage, would you care about the code?
- systems 3y agowho will write the test
- braindead_in 3y agoHumans, with a lot of help from LLMs.
- thoradam 3y agoIf you're talking about coverage in the usual sense (% of lines that were executed), it's pretty much useless. Here's an example of 100% test coverage in that sense: add a b = 2 test_add = assert_equals (add 1 1) 2 A more useful definition of coverage would be the entire possible state of the program, but this is tantamount to a proof, which is a really hard problem for programs in general. Property based testing, e.g. QuickCheck[1], gets us close, but it is often hard to come up with the right properties. [1]: https://hackage.haskell.org/package/QuickCheck https://hackage.haskell.org/package/QuickCheck