2 ms·
Even more importantly, the documentation is the contract. Most languages (and especially C) aren't nearly precise enough to declare a function's complete contr
by ken 8y ago
Even more importantly, the documentation is the contract. Most languages (and especially C) aren't nearly precise enough to declare a function's complete contract using source code. How would you know if strcmp had a bug, if there were nothing that said what it was supposed to do?
Without documentation, you're left with merely: the code is supposed to do whatever it happens to do right now. Systems like this are terrible to work on. At best, you have to verify O(n) call points across the entire code base whenever you touch any function. At worst, that interface is already public, and you can't ever "fix" anything.