|
|
|
Ask HN: Opinions about commentary in Golang
|
|
2 points
by shivylp
2815 days ago
|
|
Go convention is to write comments for every entity in a package that is exposed (starts with an upper case letter). Even linter complains about not commenting. I have heard people argue over this saying some things shouldn't be commented if they're obvious enough. I agree that obvious things don't really need a comment. But the problem of commenting only certain things as opposed to all things, is inconsistency across codebase. If new developer looks at the code and sees comments only at certain places, it might feel like the comments aren't trustworthy since there is no standard pattern. Also, I believe the term obvious itself is not objective (at the time of writing the code, most of the stuff are obvious).. What do you all think ? |
|
You may find more success posting this sort of thing at reddit.com/r/golang, or some other dedicated Go community.