3 ms·
I think a nontrivial portion of Go’s success can be attributed to having a standard format and treating deviation as compiler errors. It is immensely valuable
by abtinf 7y ago
I think a nontrivial portion of Go’s success can be attributed to having a standard format and treating deviation as compiler errors.
It is immensely valuable to be able to look at any Go code, whether in the toolchain, the standard library, or a random stackoverflow snippet, and not have to think about formatting at all.
- masklinn 7y ago> treating deviation as compiler errors. That's not the case at all. The Go compiler treats an arbitrary few lint issues as compiler errors (e.g. unused imports), code which is not gofmt-formatted isn't a compiler error.
- fwip 7y agoI think you're conflating two concepts a little bit - deviation from `gofmt` isn't a compiler error, but lots of things (like unused variables or imports) are. I think they're both great.
- abtinf 7y agoYou are corrrect. I guess I’ve learned to treat deviation from gofmt as error because of the go vim plugin. It runs goimports on save, which fixes a bunch of real errors (like unused imports).
- lucaspottersky 7y agothats actually a very annoying feature that has thrown me off when i tried. you can't even comment out your code while debugging. annoying as hell.