3 ms·
Technically, all the code in your program could rightly be called a "code example." But it's not very good for determining how to use the code in your program.
by chc 15y ago
Technically, all the code in your program could rightly be called a "code example." But it's not very good for determining how to use the code in your program. Test cases are closer to being good code examples, but they're still generally optimized for checking correctness rather than illustrating use. If nothing else, a good, complete set of test cases will be full of distracting noise.