Live data from Hacker News

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

xn--gckvb8fzb.com

131–140 of 238 posts

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

#133
I would humbly suggest that something like “lines of application code ever written”, or better yet, “source code files evaluated since Unix epoch [or “per second” if you prefer]” is probably a better metric. I think in that analysis, you would find that tabs are more than holding their own.

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

#134

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…

And what say you about reaching a consensus on the number of tabs to use?!?!?!

If someone uses more than one tab per level of indentation he should be forbidden access to editors for life

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

#135

Tabs are the preferred, more efficient and more accessible format, and most people know this. Every golang dev loves just having one tap to indent code, and nobody loves the constant repeat rattle of space indented code. Seriously though, tabs let you pick what's visually easier for you to read and I've worked with coworkers that struggle when indentation isn't clear.

>nobody loves the constant repeat rattle of space indented code.

It's hard to view your opinion as unbiased when you think this is how people indent with spaces.

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

#136
post #104
post #74

Earlier quoted context omitted.

I use tab at three. And will do to the day I die.

Sometimes I remember a workplace system I used, where someone had set tabs to 8 space. I don't know why it was 8, but it was.

It's how they've been interpreted forever on Unix and other old systems

It's probably the main reason why they're so controversial.

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

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

The few applications that don't let you configure it are less relevant now, and the alternative to consider tabs of varying lentgh would be to introduce a new spacing character in their place; hardly feasible.

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

#138
post #109
post #46

Earlier quoted context omitted.

> You can use tabs to indent and spaces to align after that, in most cases. In practice this is difficult; since the characters are invisible by default, people will inevitably mix up the two. Looks like the industry standard is to give up and use spaces everywhere, unless strict and mandatory tooling exists.

Stop aligning stuff. I don’t even use a monospaced font.

Yeah, let's just give up on readability

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

#139
post #78

The war is mostly over because regardless of it you use tabs or spaces, the many modern languages use a code formatter and reformat to whatever is common. Languages that go with tabs are also now routinely mixing it with spaces for visual alignment and assume a certain tab width for total visual width enforcement. On the other hand editors often now handle spaces as if they are tabs, even for cursor movement. So well…

And yet, navigating the code, you still have to got left-left-left-left to pass the indentation and it’s stupid. Tabs are here, everybody should use them, they are the logical better option, everybody knows it.

learn some vim based movement, jump to the next non space character.

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

#140
post #29

The most important thing is consistency. I've become a huge fan of deferring tabs vs. spaces debates to an autoformatter. Set it; forget it; argue about something else. This is most useful when applied ecosystem wide - no one in the Go ecosystem argues about tabs vs spaces, they just run `go fmt` (or more likely their editor is set to do that automatically) and move the #$@% on with life :) Fortunately for me, newer…

An autoformatter wont touch a tabbed ASCII diagram in the comments,

but the autoformatter will have dictated the choice of space vs tabs for the file in question, an likely also the width of tabs (if any) for alignment. so you just need to follow the convention.
Post reply on HN