Tabs, however, are superior - everyone can use the indentation they prefer without causing conflicts.
Tabs, however, are superior - everyone can use the indentation they prefer without causing conflicts.
Besides, everything looks horribly indented when looking at the code in Github, which renders huge and ugly 8 spaced-tabs, so lines with just a couple tabs already tend to travel to the right and disappear when using a two-column display :-(
This kind of things are what drove me from using tabs, to preferring and LOVING an already strongly opinionated tool like Prettier.js. Just apply the defaults, no more bikeshedding discussions.
[1] https://developer.mozilla.org/en-US/docs/Web/CSS/tab-size
With testing and code auto formatting pipelines already in place, this isnt a problem
To be honest, I never thought of this, I use spaces and my editor converts to 2-space indentation. But I can imagine that some people prefer 4 "space" indentation. With spaces this is impossible, whereas I now realise, an editor can render them any way it wants, so at 2 'spaces'.
So I agree somewhat, that tabs sound good on paper. But then again, I don't want to start earning less all of a sudden...
After fixing a couple of mixed tabs/space files back in the glory MS-DOS days, I became a space zealot.
Apparently it was a good decision.
Tabs are for indentation, not for alignment. If you want to align things within the same indentation level, use spaces. This will never break on any platform or in any editor.
When I was about 5 years old I ate a parsnip thinking it was a potato. My taste buds were all of a sudden overwhelmed and I spat it out in disgust. It took more than 20 years for me to try a parsnip again.
My theory is the same with tabs. Everyone developer, during their early career, learns what tabs are the hard way, that is when they open a document in another editor and, because they've made a mistake, it looks wrong. But instead of learning how to use tabs properly, they spit them out.
I rather keep using spaces, like I have been doing since 1992, plus apparently it reflects on salary.
But in practice, any combination of tabs and spaces will look wrong for someone.
It's one line in a githook for this to really be true.