title: What is the benefit of terminating if … else if constructs with an else clause?
body: <p>
  Our organization has a <strong>required</strong> coding rule (without any explanation) that: </p>
  
  <blockquote>
    <p>if … else if constructs should be terminated with an else clause</p>
  </blockquote>
  
  <p><strong>Example 1:</strong></p>
  
  <pre class="lang-cpp prettyprint-override"><code>if ( x &lt; 0 )
  {
     x = 0;
  } /* else not needed */
  </code></pre>
  
  <p><strong>Example 2:</strong></p>
  
  <pre class="lang-cpp prettyprint-override"><code>if ( x &lt; 0 )
  {
      x = 0;
  }
  else if ( y &lt; 0 )
  {
      x = 3;
  }
  else    /* this else clause is required, even if the */
  {       /* programmer expects this will never be reached */
          /* no change in value of x */
  }
  </code></pre>
  
  <p>What edge case is this designed to handle? </p>
  
  <p>What also concerns me about the reason is that <strong>Example 1</strong> does not need an <code>else</code> but <strong>Example 2</strong> does. If the reason is re-usability and extensibility, I think <code>else</code> should be used in both cases.</p>