Live data from Hacker News

The Tabs vs. Spaces war is over, and spaces have emerged victorious

xn--gckvb8fzb.com

11–20 of 238 posts

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#11

The point of the "tab" option is that there is no consensus on the number of spaces to use -- so by using tab, one uses a single character, and allows the developer to determine screen spacing to their comfort. "Tab" being a live option is a symptom of the war-never-over in absolute spacing degree -- since different people have different eye-sight, eye-strain, etc. constraints, different linguistic familiarities, cod…

Didn't you read the post? The WAR is OVER. End of discussion!!1 (golang converted me to tabs too)

Not OP, but the article ends with the following question:

> Is it truly over? ;-)

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#12

The point of the "tab" option is that there is no consensus on the number of spaces to use -- so by using tab, one uses a single character, and allows the developer to determine screen spacing to their comfort. "Tab" being a live option is a symptom of the war-never-over in absolute spacing degree -- since different people have different eye-sight, eye-strain, etc. constraints, different linguistic familiarities, cod…

"The war of accessible vs inaccessible is over; 90% of websites don't use ARIA attributes correctly, so the other 10% ought to give up already."

That's how TFA reads to me. Never give up, never surrender.

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#14
post #9
post #5

Earlier quoted context omitted.

This works until someone tries to vertically align something like a table or a line that is wrapped.

Only a goblin would align code. But if you must you can start with a new line and the right indent.

From my experience, it seems to be the people that learned PASCAL first for some reason.

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#16

The point of the "tab" option is that there is no consensus on the number of spaces to use -- so by using tab, one uses a single character, and allows the developer to determine screen spacing to their comfort. "Tab" being a live option is a symptom of the war-never-over in absolute spacing degree -- since different people have different eye-sight, eye-strain, etc. constraints, different linguistic familiarities, cod…

There absolutely is a consensus: a hard tab is defined as 8 spaces in numerous standards (obviously this only applies to monospace fonts).

The fact that people choose to reject this does not change the reality.

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#17
post #5

Tabs are better, simply because you can view them as you like. Go obviously does this, and Haxe too (with default formatting options, even tho its configurable)

This works until someone tries to vertically align something like a table or a line that is wrapped.

Yes, this. Which the counter point is either, Don't align things, or use tabs for indentation, and spaces for alignment.

And maybe you can enforce no alignment, but that's a hard fight to win.

And as far as tabs for indentation and spaces for alignment, I've found no practical way to enforce this via tooling/linting. And a rule without enforcement becomes inconsistent, which is how we get files full of mixtures of spaces and tabs, which is how people get frustrated with tabs, and we decide to throw it all out.

And inevitably, that's part of how spaces "won"

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#18
post #5

Tabs are better, simply because you can view them as you like. Go obviously does this, and Haxe too (with default formatting options, even tho its configurable)

This works until someone tries to vertically align something like a table or a line that is wrapped.

https://nick-gravgaard.com/elastic-tabstops/

Re: The Tabs vs. Spaces war is over, and spaces have emerged victorious

#20
post #5

Tabs are better, simply because you can view them as you like. Go obviously does this, and Haxe too (with default formatting options, even tho its configurable)

This works until someone tries to vertically align something like a table or a line that is wrapped.

That’s mostly editor braindamage (that has unfortunately leaked into some otherwise very good codebases, like LuaJIT). Indent things with tabs, align with spaces[1]:

  if (foo) {
  »   frobnicate(bar,
  »   ...........baz);
  }
Both camps will hate you, but things will work just as they should.

[1] https://www.emacswiki.org/emacs/SmartTabs

Post reply on HN