Live data from Hacker News

Facebook Go Libraries

github.com

11–20 of 98 posts

Re: Facebook Go Libraries

#11
post #8

Earlier quoted context omitted.

Go uses tabs. That's the law. It's in the documentation. Groups of spaces and tabs are semantically different. Tabs mean indentation. Spaces mean spaces.

>Tabs mean indentation. Sorry but this is false. The only thing a tab means, is tab. Please provide your reasoning for the down voting. Thank you.

The dictionary in front of me disagrees:

"A key on a computer keyboard that, when pressed, inserts a special ASCII character used for formatting text, as in indenting a line or block of text."

Actually going back it means tabulation which was an early form of alignment of tables on typewriters. The tab key advanced the carriage to the next tabulation point. It was repurposed as a way of indenting code later and it has become an additional definition of that fact.

(I'm old enough to have owned a typewriter, a nice Selectric one as well ;-)

Re: Facebook Go Libraries

#13
post #10

Earlier quoted context omitted.

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.

Sorry, changed "spaces" to "columns".

... 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

#16
post #10

Earlier quoted context omitted.

Sorry, changed "spaces" to "columns".

... 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?

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

#17
post #8

Earlier quoted context omitted.

>Tabs mean indentation. Sorry but this is false. The only thing a tab means, is tab. Please provide your reasoning for the down voting. Thank you.

The dictionary in front of me disagrees: "A key on a computer keyboard that, when pressed, inserts a special ASCII character used for formatting text, as in indenting a line or block of text." Actually going back it means tabulation which was an early form of alignment of tables on typewriters. The tab key advanced the carriage to the next tabulation point. It was repurposed as a way of indenting code later and it ha…

We are talking about computer semantics which exist in a discretized world, not english language semantics. By your logic, the word integer would be any number not a fraction or decimal down to negative infinity up unto positive infinity. There is no concept of infinity on a computer.

Anyways, that's besides the point, and I think you missed the meaning behind my comment.

The reason why a tab space cannot semantically mean indentation in our world, is because nobody can agree on what that indentation should be. Since you are old enough to have owned a typewriter, maybe you are old enough to remember that by legacy, a tab was equivalent to exactly 8 spaces, and much of our software that runs the internet makes that assumption. Now however, people are saying "use tab to mean indent and everyone can have their way" To quote mikko, "There is no style guide or coding conventions saying that the tab character should be the indent. This assumption is easy to make because it allows you to stick your head into the sand, ignore the surrounding world and by singing “let the users pick their own tab width” mantra."

Again, this wasn't to start a tab vs spaces war for go, and why go chose tabs. It's fine to make a choice, but it was your second statement that provoked my comment.

Re: Facebook Go Libraries

#18

Earlier quoted context omitted.

The dictionary in front of me disagrees: "A key on a computer keyboard that, when pressed, inserts a special ASCII character used for formatting text, as in indenting a line or block of text." Actually going back it means tabulation which was an early form of alignment of tables on typewriters. The tab key advanced the carriage to the next tabulation point. It was repurposed as a way of indenting code later and it ha…

We are talking about computer semantics which exist in a discretized world, not english language semantics. By your logic, the word integer would be any number not a fraction or decimal down to negative infinity up unto positive infinity. There is no concept of infinity on a computer. Anyways, that's besides the point, and I think you missed the meaning behind my comment. The reason why a tab space cannot semanticall…

I get what you mean but a tab is purposely meaningless and unqualified.

It means 1 indent, not 8 spaces, 3 bananas or one tree. It is a unit. How the user displays that is up to them.

Re: Facebook Go Libraries

#19
post #10

Earlier quoted context omitted.

Sorry, changed "spaces" to "columns".

... 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?

> 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

#20

Earlier quoted context omitted.

... 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?

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…

I agree. For me, I want enough indentation to make the structure obvious. 8 columns is way overkill in that regard.
Post reply on HN