News for hackers. Stuff that matters.
Re:What's the deal with tab size (8 spaces) in the GitHub UI? by lmm on Monday September 20, 2021 @09:58PM (#28601265)
Which fails silently - someone will make a change that looks good to them, but messes up indentation for anyone else with a different tabstop. Indeed two people looking at the same code might disagree about which block some statements were part of.

If you want to use tabs for indentation then you absolutely must enforce that they are used consistently, and I've never seen any organisation succeed at that. Whereas if you use spaces then you can simply ban the tab character from all source files (which organisations do enforce), and then at least you guarantee that everyone will see the same thing when they look at a given piece of code.

Re:What's the deal with tab size (8 spaces) in the GitHub UI? by gilgoomesh on Monday September 20, 2021 @10:12PM (#28601361)
What you're describing isn't messed up indentation but messed up column alignment (trying to align content on multiple lines).

Indent only using tabs, based only on scoped, and there's no possibility of problems. It's super simple to enforce via linting.

People who love column alignment are really painting their code on a grid of characters and expect to be able to paint any coordinate. There are even editors that let you click past the end of the line and they'll fill in all the spaces to that point. It's madness, I tells ya.

Re:What's the deal with tab size (8 spaces) in the GitHub UI? by lmm on Monday September 20, 2021 @11:23PM (#28601784)
> What you're describing isn't messed up indentation but messed up column alignment (trying to align content on multiple lines).

It's still indentation - the point is lining up the start of a line with some point on the line above.

> It's super simple to enforce via linting.

And yet I've never seen anywhere manage to actually enforce it in practice.