4 ms·
> forgoes its opinionated nature, even if it's at the cost of messier code Absolutely not. Have you never worked with anyone who just can't adhere to any stan
by joobus 9y ago
> forgoes its opinionated nature, even if it's at the cost of messier code
Absolutely not. Have you never worked with anyone who just can't adhere to any standards? Go forces that guy at my office to at least get spacing and braces right, even if the rest of his code is lacking.
- pjmlp 9y agoI was doing that with indent and CVS plugins back in 2000.
- sliken 9y agoYes, but it's pretty central to go. If code is posted somewhere for review/comment "Why doesn't this work?", often the first comments is run gofmt on it first. It's generally expected that all commits to code are in the gofmt standard, and there's not even the option to change the format. I suspect if you analyzed all the code on github that go would have much higher compliance with the gofmt standard that you'd find to any other single standard for java or c++. Gofmt is pretty nice, I wouldn't make the same decisions myself, but it's pretty valuable to have all code I see with exactly the same formatting. Additional gofmt uses the same parse as the language and can even parse, modify, and invert to produce a new source file. Similarly it's much easier to write a golang aware editor than most other languages.