title: Code formatting: is lining up similar lines ok?
body: <p>I recently discovered that our company has a set of coding guidelines (hidden away in a document management system where no one can find it). It generally seems pretty sensible, and keeps away from the usual religious wars about where to put '{'s and whether to use hard tabs. However, it does suggest that "lines SHOULD NOT contain embedded multiple spaces". By which it means don't do this sort of thing:</p>
  
  <pre><code>foo    = 1;
  foobar = 2;
  bar    = 3;
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>if      ( test_one    ) return 1;
  else if ( longer_test ) return 2;
  else if ( shorter     ) return 3;
  else                    return 4;
  </code></pre>
  
  <p>Or this:</p>
  
  <pre><code>thing foo_table[] =
  {
    { "aaaaa", 0 },
    { "aa",    1 },
    // ...
  }
  </code></pre>
  
  <p>The justification for this is that changes to one line often require every line to be edited. That makes it more effort to change, and harder to understand diffs.</p>
  
  <p>I'm torn. On the one hand, lining up like this can make repetitive code much easier to read. On the other hand, it does make diffs harder to read.</p>
  
  <p>What's your view on this?</p>