Live data from Hacker News

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

xn--gckvb8fzb.com

81–90 of 238 posts

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

#81

Completely agree: tabs FTW. I wish I could find the reference, but when dealing with mono-spaced fonts, readability is apparently enhanced with THREE spaces per indent. Now, good computer people hate non powers-of-two, so it's either 1, 2, 4, or 8 spaces!!!! I guess I'm not a good computer person, because my eyes find tab stops at '3 spaces per tab' just right.

I have used tabs with a three-space width since forever, and it is indeed the better spacing.

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

#82

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…

> so by using tab, one ... allows the developer to determine screen spacing to their comfort (Allow me to reply to this age-old argument with the age-old counter argument...) But you also have to decide at what point to hard wrap each line based on a max line length, and you can only do that based on some choice of tab size. Anyone with a different tab size preference would see the right column wandering depending on…

I dont even understand what youre trying to describe here. What is a wandering right column?

This argument fails by default if its not understandable.

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

#83

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)

I never bought this argument, because it seems the vast majority of people are fine with viewing tabs rendered as four spaces. And pretty much the default for spaces is four spaces. So I'm starting to think 99% of the world uses 4 spaces and it's the vocal minority that like 3 spaces or 5 spaces viewing for tabs. And in that case, the configurability is rather irrelevant.

Until you are visually deficient. Then it matters a lot.

Accessibility is not a joke.

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

#84

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…

> so by using tab, one ... allows the developer to determine screen spacing to their comfort (Allow me to reply to this age-old argument with the age-old counter argument...) But you also have to decide at what point to hard wrap each line based on a max line length, and you can only do that based on some choice of tab size. Anyone with a different tab size preference would see the right column wandering depending on…

The whole line of thought is just a waste of cycles. /Screams "tabs", sticks fingers in ears and walks away.

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

#85

In the 90s, when I used various text editors like Ultraedit, Nedit, Pico, Nano, Vi, and my co-workers used Dreamweaver, Visual C++, Visual Basic, NetBeans I was in the "TABs are superior" camp but only for the initial indention of code blocks. But somewhere along the way, editors added features that let you see invisibles, and let you set up smart tabs so that you could hit tab, but it would interpolate 4 spaces (or…

Navigation is still more painful with spaces than with tabs.

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

#86

Earlier quoted context omitted.

Exactly. Indentation != spacing. And thats all the argument i need. I dont understand why people argue with consistent text layout for all-spaces. You can use tabs to indent and spaces to align after that, in most cases.

honestly, spaces shouldn't be used; it's a design issue- use tabs only for indentation, then the language should ideally support not having to use spaces for manual alignment.

But this depends on the identifiers you choose. Languages cant help here, or better should not.

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

#87
post #83

Earlier quoted context omitted.

I never bought this argument, because it seems the vast majority of people are fine with viewing tabs rendered as four spaces. And pretty much the default for spaces is four spaces. So I'm starting to think 99% of the world uses 4 spaces and it's the vocal minority that like 3 spaces or 5 spaces viewing for tabs. And in that case, the configurability is rather irrelevant.

Until you are visually deficient. Then it matters a lot. Accessibility is not a joke.

That is a good point.

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

#89

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)

You can view leading spaces however you like as well. Modern text editors can be configured to display any number of leading spaces as your preferred indentation width. It's not the 1970s anymore, modern text editors easily support something so trivial.

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

#90
post #67

Earlier quoted context omitted.

Exactly. Indentation != spacing. And thats all the argument i need. I dont understand why people argue with consistent text layout for all-spaces. You can use tabs to indent and spaces to align after that, in most cases.

You can't use spaces to align because you can't assume a monospaced font will always be used. You can't use tabs either for that matter. If you need structure, use the language's punctuation and line breaks.

I can and do assume a monospaced font when using spaces to align code. Folks using variable width fonts will get what they deserve.
Post reply on HN