I prefer tabs (tab-size: 4), but I prefer even more if everyone follows the same conventions.<p>Dart, for example, uses 2 spaces. When I write Dart code, I use 2 spaces.<p>And that's the end of that. As history has shown, there is absolutely no point in discussing this. There is no clear winner.
Awesome. The only thing that really matters is to have a convention, and tabs has been the accepted convention in the Go community since forever.<p>Changing go fmt to enforce the convention is simply making sure that people write code the same and frees the developers from the tireless discussion about which one is better. That alone outweigh any disadvantage of choosing one or the other.
I'm personally in the spaces camp but my favorite point in favor of tabs no one has mentioned is all of the bytes you're saving. In a large codebase you can save kilobytes to megabytes by switching from spaces to tabs. :)
The <i>right</i> way to solve all this tabs/spaces indentation mess would be to use Elastic Tabstops¹.<p>1) <a href="http://nickgravgaard.com/elastictabstops/" rel="nofollow">http://nickgravgaard.com/elastictabstops/</a>
I predict that this change will be reverted in a few months when the Go team realizes that code is read in a lot of different places, most of which never display hard tabs correctly.
Who actually uses tabs instead of spaces? I'm genuinely curious--one of the first things pretty much any project I've ever been involved in has been the setting of tabs characters to become spaces, simply because all text editors are retarded in this regard. This is quite strange.