|
|
|
|
|
by seanwilson
1755 days ago
|
|
> (this comment applies to this line, this one to the function, this to a group of functions...) This is probably the major reason I much prefer introducing new variables and functions solely so I can give them descriptive names over using comments. Comments aren't scoped so they're often ambiguous and imprecise compared to code, which also contributes to them becoming out-of-sync with the code over time. Comments above a function definition are generally better than comments inside a function for example as it's clearer what the scope is. |
|