News for hackers. Stuff that matters.
Re:Tabs, spaces and your salary – how is it really? by runarberg on Tuesday June 20, 2017 @04:04PM (#14598073)
Especially diff. The single thing that annoys me with tabs is the fill behavior. The tab stop is not affected by the leading ‘+’ or ‘-’ in the start of the line which can lead to some weird looking code like :

     function foo() {
    -   if (baz) {
    +   if (bar) {
            baz();
        }
     }
If a tool is not set up to deal with this problem (for example `git config core.pager less -S -x1,5` for a 4 space tab stop, `less -S -x4` makes the first second line above indent with 3 not 4 spaces).

This is also a problem if a line is merged to the line above and an unaware developer leaves a tab character—previously used as indentation—thinking it is a space character. To the developer with the tab-stop set to four there is a one in a four chance they look identical.

There are no comments on this comment yet.