On 1/25/2013 10:51 AM, Brian Smith wrote:
Tabs are nice because users can pick their own display width. Spaces are nice because non leading space can be formatted more accurately. There's very little difference in readability though.
Tabs are only workable if everyone involved is fanatical about consistently using them for every block indent and never ever using them for anything else. That level of consistency doesn't exist in real world developer groups -- and thus they become untenable.
The only thing that's important in the tabs vs spaces debate is to pick one and stick to it and enforce it consistently.
Proper usage of tabs in beyond any enforcement regime I've seen.
Converting files from one to the other is a good way to make version control hard to use, particularly if you're using a editors that can annotate a file with changes. Finding out when a particular line was changes is a complete pain in the arse when someone's helpfully autoformatted the file changing every line. Some combinations can effectively ignore whitespace change, many cannot. Best not to do that, instead if you really care, block commits that break whichever policy you choose.
Set your diffing tools to ignore space changes and then there's no issue with tab-to-space conversion muddying them up.

Now if you do more general reformatting then, yes, that makes version control hard to follow, but sometimes there's little alternative when someone's made a complete mess of things. At that point you just do a separate commit for the reformatting and move on.

--
Jess Holle

--
You received this message because you are subscribed to the Google Groups "Java 
Posse" group.
To post to this group, send email to javaposse@googlegroups.com.
To unsubscribe from this group, send email to 
javaposse+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/javaposse?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to