News for hackers. Stuff that matters.
Re:Tabs, spaces and your salary – how is it really? by Peaker on Tuesday June 20, 2017 @11:43AM (#14595479)
In all collaborative projects I've been that allowed tabs, all files that had been edited by tab users were a mishmash of spaces and tabs that made no single tab width configuration workable. If you chose tab width as 4, some parts of functions would look right, others would have messed up indentation. Ditto for any other tab size.

The theory of tabs for indent and spaces for alignment works. But when collaborating, the practice requires too much support from tooling and too much education for humans -- so it's just not worth the tiny benefit.

Re:Tabs, spaces and your salary – how is it really? by Veedrac on Tuesday June 20, 2017 @11:58AM (#14595636)
That's not a fair comparison. You either disallow tabs, or you disallow spaces. A mismatch isn't either, so it doesn't evidence either being better than the other.
Re:Tabs, spaces and your salary – how is it really? by dxhdr on Tuesday June 20, 2017 @02:35PM (#14597248)
Disallowing spaces isn't an option, you can't align code using tabs. You have to both disallow spaces and enforce a no-alignment (leading-indent-only) formatting style.

Just use spaces! You can't mess it up. ;)

Re:Tabs, spaces and your salary – how is it really? by jimmaswell on Tuesday June 20, 2017 @02:41PM (#14597299)
Meticulously lining code up like ASCII art seems like an antipattern to me nowadays. It might make some regions of the code look a little bit nicer, but it's never really strictly necessary and it comes at the cost of higher maintenance - for example, add to that list of assignments with lined up equals signs and you have to make your addition line up too, and if your variable name is longer than the longest one in the list so far you have to move all the previous ones over.
Re:Tabs, spaces and your salary – how is it really? by Veedrac on Tuesday June 20, 2017 @03:13PM (#14597563)
> Just use spaces! You can't mess it up. ;)

Oh how I envy someone who can say that.

Re:Tabs, spaces and your salary – how is it really? by jimmaswell on Tuesday June 20, 2017 @12:50PM (#14596194)
Then just run an autoformatter over the whole codebase once and clean up anything that looks wrong as you come across it later.
Re:Tabs, spaces and your salary – how is it really? by biggieshellz on Tuesday June 20, 2017 @11:51AM (#14595555)
Seems to work OK for the Linux kernel, and the tooling is not onerous -- just run checkpatch.pl on your commits before pushing them upstream.
Re:Tabs, spaces and your salary – how is it really? by user5994461 on Tuesday June 20, 2017 @11:57AM (#14595622)
The kernel has an official & mandatory rule to enforce tabs, at a length of exactly 8 spaces per tab. Anything that doesn't respect that will be rejected without mercy.