Hacker News new | past | comments | ask | show | jobs | submit login

Formatting is only a subset of style, there's plenty of questions it doesn't solve even in Go. Off the top of my head: value v pointer receivers, named return values, public fields v accessors, var v :=, in-band versus out-of-band signalling, closures in `go` statements (and even raw `go` statements at all), channel types, iface side-casting, etc...



And generally my answer to all of that or both go and python is be consistent to yourself and to the codebase. And if you're going to change stuff in a big way. have a reason. And if you don't have a reason don't change.


> And generally my answer to all of that or both go and python is be consistent to yourself and to the codebase.

That's nice but not everybody thinks that way, and when the project gets big enough inconsistencies get introduced everywhere so there is no way to be "consistent with the codebase" unless you impose consistency via a style guide (and ideally a linter, so reviewers don't have to be the one performing style checking)




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: