Live data from Hacker News

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

xn--gckvb8fzb.com

221–230 of 238 posts

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

#221
post #142

Earlier quoted context omitted.

If you enforce a specific width it's dumb to use tabs, just use spaces

I don't think anybody in our team uses tabs, but afaik you still call it tab width

It's called indentation, and your team apparently uses a fixed number of spaces as chosen by the author.

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

#222

Obligatory Silicon Valley HBO clip on Tabs vs Spaces: https://www.youtube.com/watch?v=oRva7UxGQDw

Oh great. Now you've restarted the Windows, Mac, Linux wars.

I think that war was also "won" -- depending on your perspective.

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

#223
One of the best side effects of a space victory is that Tab Separated Values are a much nicer format than Comma Separated Values if you aren't bothering to use a proper library since \t appears materially much less often than , in most datasets of interest. (Which you should but, you know, just in case.) Just my two cents.

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

#224
post #176
post #67

Earlier quoted context omitted.

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.

You can use tabs, that’s exactly their role, but only in theory since in practice elastic tab stops that would work with proportional fonts aren’t implemented anywhere in code, only word processors

no, i can't. i want to be able to align on arbitrary columns, not on tab stops. and when i add or remove character that break the alignment, tabs mess everything up. spaces don't.

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

#225
post #224
post #176

Earlier quoted context omitted.

You can use tabs, that’s exactly their role, but only in theory since in practice elastic tab stops that would work with proportional fonts aren’t implemented anywhere in code, only word processors

no, i can't. i want to be able to align on arbitrary columns, not on tab stops. and when i add or remove character that break the alignment, tabs mess everything up. spaces don't.

No, you can't do that with spaces because spaces have a fixed width, which can't always be aligned to a variable width column. Only in the primitive environment of fixed width fonts does this work, but even there the tabstops can also be placed at an arbitrary column position, check Word out

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

#228
post #225
post #224

Earlier quoted context omitted.

no, i can't. i want to be able to align on arbitrary columns, not on tab stops. and when i add or remove character that break the alignment, tabs mess everything up. spaces don't.

No, you can't do that with spaces because spaces have a fixed width, which can't always be aligned to a variable width column. Only in the primitive environment of fixed width fonts does this work, but even there the tabstops can also be placed at an arbitrary column position, check Word out

anyone writing code with variable width font deserves the hell they put themselves in.

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

#230

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…

I used to defend tabs for this reason, except I kept running into source code formatters/displays online that would attempt to display my code with the tabstop set to 8 spaces, which made it nigh-unreadable. While I run into fewer that do this nowadays, it still reminds me that with tabs, What I Write May Not Be What You See, which can lead to readability issues, which I feel is a solid enough point against tabs that…

> that would attempt to display my code with the tabstop set to 8 spaces,

Which is the right thing to do. When did the tab stopped having 8 spaces ?

Post reply on HN