Live data from Hacker News

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

xn--gckvb8fzb.com

1–10 of 238 posts

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

#2
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, code-density preferences, and so on.

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

#4
Rob Pike on why Go is indented with tabs [0]:

> How wide should the indentation be? 2 spaces? 4? 8? Something else?

> By making the indent be a tab, you get to decide the answer to that question and everyone will see code indented as wide (or not) as they prefer.

> In short, this is what the tab character is for.

0: https://groups.google.com/g/golang-nuts/c/iHGLTFalb54/m/zqMo...

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

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

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

#7

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)

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

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

tabs for indentation, spaces for alignment

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

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

Only a goblin would align code.

But if you must you can start with a new line and the right indent.

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

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

I use tabs for indentation and spacing for alignment. Tables should be aligned with spaces. A wrapped line can be tabbed up to the start of the previous line and then spaced for alignment.
Post reply on HN