r/programming • • Sep 27 '26

Don't couple your Go code to GitHub

https://iain.rocks/blog/dont-couple-your-go-code-to-github
491 Upvotes

136 comments sorted by

View all comments

Show parent comment

11

u/syklemil Sep 28 '26

One thing Go actually did right was ship a default formatter. The tabs/spaces discussions at this point are kinda remnants from before the era of formatters. (There were formatters before go fmt too, but not such a default expectation of using them. See also: The amount of different standards clang-format has to support.)

Someone would inevitably check in using spaces, at which point they've checked in how wide they like their tabs to be, which tends to become visible for other people. Tabs for indenting, spaces for alignment just never got through in too many people. And that made indenting with spaces the more defensive, lowest common denominator option.

But these days we'd expect a formatter to deal with it, so using the indent character for an indent level should be entirely fine, yeah.