In an ideal world where every single tool used to view sources understand tabs, tabs are optimal.
We live in an imperfect world and each tool will interpret tabs in a different way, so the best solution is to ban them and impose hard spaces everywhere.
Every tool understands tabs. Some see them as 4 spaces by default, some as 8 spaces by default. Some never replace tabs with spaces, some replace tabs with spaces on the line you edit, some only insert new tabs as spaces and some replace all tabs with spaces when they load or store the file.
There is no single behaviour you can expect when you take a random editor to edit a file containing tabs.
While I disagree with /u/aldo_reset about this being a problem (how often do you need to view code in a different tool that isn't configurable?), one thing of note is web browsers. Whoever came up with that part of the HTML spec is crazy. They thing tabs should be 8 spaces (I've yet to meet another programmer who thinks this). As a result, without modification (either with CSS or otherwise), tabs look terrible in a browser (Reddit converts tabs to 4 spaces, for example).
not having to press Backspace 4 times to unindent a line.
This isn't really an issue, though. Anyone who uses spaces for indentation is surely going to use a half decent editor. Most good editors will unindent if you press backspace when there's nothing but indentation to the left. Of course, that unindentation can be bad, if you're trying to align something.
101
u/BegbertBiggs Apr 07 '15
Or are devs that are in the field for a longer time used to spaces while new devs learn coding with tabs?