Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having a standard style is valuable precisely because it's a waste of time to debate or care about this sort of thing. The value of being strict is that tools can do a strict formatting automatically with zero human input.

In other words, for this sort of style stuff, a formatter that everyone uses is much better than either a linter or a "trust your instincts" approach.



I can't upvote this enough. We decided to go with a given set of rules for linting at the project start and problems due to limitations by the linter have been extremely rare, in which case we've updated the rules because we can motivate a change.

Of course, a tool like 'go fmt' is far superior to common linters, as most third party packages look the same as your own code.


Yep. I think go fmt is the most state of the art thing in Go, and that every language should prioritize having the something similar built in.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: