On Tue, May 12, 2015 at 1:10 PM, Timothy Humphrey <[email protected]> wrote: > Why is it preferable to use four spaces for an indent, rather than a single > tab? Four keystrokes vs. a single keystroke.
* Using tabs allows every developer on the project to decide tab width for themselves, without affecting any other developer. It doesn't require any special configuration of IDE/text editor. * Using spaces forces all developers to a specific tab width. Requires more keystrokes, or a config change to make the tab key output spaces instead. * Mixing spaces and tabs for indentation is right out, totally confusing for diffs, messes up formatting, etc. Don't do this. Using tabs is clearly superior technically. However since some developers use spaces, there is danger of entering into "mixed mode". Therefore a mandated style guide to pick one is important. IMHO, some people prefer spaces because they don't understand their tools enough to set a custom tab width, and they want a different tab width from default. So they resort to this terrible hackery to get a custom tab width. _______________________________________________ UPHPU mailing list [email protected] http://uphpu.org/mailman/listinfo/uphpu IRC: #uphpu on irc.freenode.net
