3 ms·
They might be configured differently, and you usually can't align stuff properly using just tabs, you have to use a space or three somewhere. Also, you never kn
by nottorp 9y ago
They might be configured differently, and you usually can't align stuff properly using just tabs, you have to use a space or three somewhere. Also, you never know if it's spaces, tabs or a combination of them in existing code - which you may have not written yourself.
So in the long run, the indentation WILL get fucked up and you WILL miss something when fixing a bug in code that you or someone else wrote 6 months ago. And your 10 minute bug fix will take 3 hours. Multiply both values by a constant factor as necessary.
It's simply not worth the trouble.
- SippinLean 9y ago>you usually can't align stuff properly using just tabs Huh? Things indented to 1 tab will align with everything else on 1 tab. Things aligned to 2 will align with everything else at 2 tabs. >you have to use a space or three somewhere Why? Tabs will indent with other tabs. >you never know if it's spaces, tabs or a combination of them in existing code Well they should never be combined for indentation. Unless you mean using tabs for indentation and spaces for alignment, but this wouldn't create any issues. Using tabs for spacing is objectively poor form. I open space- and tab-indented files in my IDE, they are all converted to tabs. It is always consistent.
- pvinis 9y agoOh god. I also prefer tabs, but if a file has a choice of tabs or spaces, never change the whole thing to what you prefer. Always keep it as is.
- SippinLean 9y agoGood point, in my case that's just how I work on it, git magic converts it to whatever matches the repo style before it's committed.
- creepydata 9y ago>you never know if it's spaces, tabs or a combination of them in existing code - which you may have not written yourself. Um... I always know because I always set my IDEs to show those characters. You don't?
- sambe 9y agoI don't think the answers here really make a clear case that tabs are the cause of the IDE/editor problems. People intentionally introducing incompatibilities (mixing tabs & spaces, setting their editor to convert) seem to tbe cause. And that would apply regardless of the initial choice.