|
|
|
|
|
by flatline3
5050 days ago
|
|
> That's what function names are for. A single function for every 3-4 line operation would result in incredibly disjointed code, and would require more explicit documentation of invariants because that function can now be called elsewhere (at least inside of the given translation unit). > A useful comments says why code is this way, it doesn't summarize or repeat code. That's nonsensical. Why wouldn't you want to abstract the complex? |
|
If you need a comment to say what the next four lines do, you need a function for that, not a comment.