title: Is it really better to have an unnecessary function call instead of using else?
body: <p>So I had a discussion with a colleague today. He strongly suggested me to change a code from</p>
  
  <pre><code>if(condition){
     function-&gt;setValue(true)
  }
  else{
     function-&gt;setValue(false)
  }
  </code></pre>
  
  <p>to</p>
  
  <pre><code>function-&gt;setValue(false)
  if(condition){
      function-&gt;setValue(true)
  }
  </code></pre>
  
  <p>in order to avoid the 'else'. I disagreed, because - while it might improve readability to some degree - in the case of the if-condition being true, we have 1 absolutely unnecessary function call.</p>
  
  <p>What do you guys think?</p>