title: Match empty list using case/match or if/else?
body: <p>Is there any reason that matching an empty list should be done using a case/match instead of if/else, other than style? For example:</p>
  
  <pre><code>val a: List
  
  def compute: Int = 
    if (a.isEmpty) 0
    else a.sum
  </code></pre>
  
  <p>versus</p>
  
  <pre><code>def compute: Int = 
    a match {
      case Nil =&gt; 0
      case _ =&gt; a.sum // This is bad. For sake of illustration only.
    }
  </code></pre>