News for hackers. Stuff that matters.
Re:Facebook Go Libraries by boomlinde on Thursday November 13, 2014 @09:25AM (#8601616)
No, it should show it as tabs, because that's what it is. Ideally, it should show it as 8 column tabs, as that is what gofmt assumes by default.
Re:Facebook Go Libraries by Kiro on Thursday November 13, 2014 @09:44AM (#8601711)
Sorry, changed "spaces" to "columns".
Re:Facebook Go Libraries by boomlinde on Thursday November 13, 2014 @10:09AM (#8601845)
... and the only reason for it to be four columns is that you personally find it hard to read, or do you have another, more compelling argument against using 8 column tabs?
Re:Facebook Go Libraries by possibilistic on Thursday November 13, 2014 @10:29AM (#8601963)
Personally, I find 8 columns to be an incredible waste of horizontal space. I frequently place editor windows/panes side by side, and using 8 columns or spaces wastes valuable screen real estate.

But this isn't just a reaction rooted in practicality. To me, this looks and feels absurd. It kind of hurts to read. Again, this is just my personal take.

I prefer scope indentation of any kind to render as 4 spaces, but I'm okay with 2 as well.

Re:Facebook Go Libraries by Dewie on Thursday November 13, 2014 @10:57AM (#8602171)
I agree. For me, I want enough indentation to make the structure obvious. 8 columns is way overkill in that regard.
Re:Facebook Go Libraries by esrauch on Thursday November 13, 2014 @11:18AM (#8602309)
I'm kind of surprised that 8 column tabs is even being discussed, I thought 2 or 4 were the normal values?
Re:Facebook Go Libraries by Kiro on Thursday November 13, 2014 @10:41AM (#8602046)
> and the only reason for it to be four columns is that you personally find it hard to read

Yes, it was just a personal opinion.

Re:Facebook Go Libraries by boomlinde on Thursday November 13, 2014 @01:42PM (#8603218)
But not personal enough not to be the basis for an argument about what github should do to display Go code.
Re:Facebook Go Libraries by Kiro on Thursday November 13, 2014 @02:55PM (#8603662)
What are you arguing about exactly? Am I not allowed to think Github should display them as 4 columns?
Re:Facebook Go Libraries by ominous_prime on Thursday November 13, 2014 @02:05PM (#8603371)
I don't think gofmt assumes any width for tabs. It, prints `\t` for indentation, and that's all.
Re:Facebook Go Libraries by boomlinde on Thursday November 13, 2014 @06:47PM (#8604924)
It has the -tabwidth option, defaulting to 8. I have yet to figure out what it's used for, but presumably there is some case where it is used for alignment.
Re:Facebook Go Libraries by enneff on Thursday November 13, 2014 @07:20PM (#8605082)
> It has the -tabwidth option, defaulting to 8

It was only used when you invoked the other option to use spaces instead of tabs. Both options are now removed. gofmt doesn't care how wide your tabstops are.