3 ms·
My main reason for preferring spaces is that I have yet to work in any context where tabs occurred where it did not end up with mangled formatting sooner or lat
by vidarh 9y ago
My main reason for preferring spaces is that I have yet to work in any context where tabs occurred where it did not end up with mangled formatting sooner or later. Yes, often because it ended up being mixed with spaces, accidentally or intentionally, but nevertheless it seems to me to end with someone making a mess of it.
If everyone used tabs perfectly, I'd be fine with them...
- GavinAnderegg 9y agoIsn't is also possible for someone to copy/paste something with tabs into space-indented code? Isn't is also possible for someone's editor to start off with tab-based indentation by default instead of space-based and mistakenly add the wrong whitespace to the project? As I've said in other parts of this thread, I'm not that worked up about tabs vs. spaces, and I use spaces most of the time. I just don't find this argument for space superiority very convincing. PS: If everyone showed invisible characters in their editors, I think the world would be a better place.
- vidarh 9y agoA decent editor can be configured to convert those tabs to spaces on paste. And if you stick to only spaces it is trivial to reject tab containing code in commit hooks. It's harder to reject code that uses spaces wrong in tab-indented code, unless you outlaw spaces for alignment too.