title: Programming without if-statements?
body: <p>I remember some time (years, probably) ago I read on Stackoverflow about the charms of programming with as few if-tests as possible. <a href="https://stackoverflow.com/questions/7264145/if-less-programming-basically-without-conditionals">This question</a> is somewhat relevant but I think the stress was on using many small functions that returned values determined by tests depending on the parameter they receive. A very simple example would be using this:</p>
  
  <pre><code>int i = 5; 
  bool iIsSmall = isSmall(i);
  </code></pre>
  
  <p>with <code>isSmall()</code> looking like this:</p>
  
  <pre><code>private bool isSmall(int number)
  {
      return (i &lt; 10);
  }
  </code></pre>
  
  <p>instead of just doing this:</p>
  
  <pre><code>int i = 5;
  bool isSmall;
  if (i &lt; 10) {
      isSmall = true;
  } else {
      isSmall = false;
  }
  </code></pre>
  
  <p>(Logically this code is just sample code. It is not part of a program I am making.)</p>
  
  <p>The reason for doing this, I believe, was because it looks nicer and makes a programmer less prone to logical errors. If this coding convention is applied correctly, you would see virtually no if-tests anywhere, except in functions whose <em>only purpose is to do that test</em>.</p>
  
  <p>Now, my question is: is there any documentation about this convention? Is there anyplace where you can see wild arguments between supporters and opposers of this style? I tried searching for the Stackoverflow post that introduced me to this, but I can't find it anymore. </p>
  
  <p>Lastly, I hope this question doesn't get shot down because I am not asking for a solution to a problem. I am simply hoping to hear more about this coding style and maybe increase the quality of all coding I will do in the future.</p>