title: Is there an advantage to using a point-free identity function instead of a wildcard?
body: <p>If a function has a case that will result in returning the input as-is, is there anything to be gained by using a point-free <code>id</code> for that case? </p>
  
  <p>Example:</p>
  
  <pre><code>-- First way, use some symbol as wildcard
  myFunc :: Int -&gt; SomeData -&gt; SomeData
  myFunc 0 _ = _
  myFunc ...
  
  -- Second way, point-free `id`. Is this more efficient?
  myFunc :: Int -&gt; SomeData -&gt; SomeData
  myFunc 0 = id
  myFunc ...
  </code></pre>
  
  <p>One standard function where I thought this might be used is <code>drop</code> since <code>drop 0</code> is effectively <code>id</code>. But if you look at the <a href="http://hackage.haskell.org/package/base-4.7.0.2/docs/src/GHC-List.html#drop" rel="nofollow noreferrer">source code</a>, it is not point free (there is <code>drop 0 xs = xs</code> ... you have to scroll down a little to see the definition; look for <code>drop (I# n#) ls</code>). I suspect it can't matter much if <code>drop</code> doesn't make use of it.</p>
  
  <p>Edit: Actually <a href="https://stackoverflow.com/a/8936002/567620">it looks like equations with differing numbers of arguments is disallowed</a> by the case-expansion method for translating multiple-equation function definitions.</p>
  
  <p>So if you opted for this route, you'd have to make sure all the remaining equations for the function are also definable in the same point-free style -- which is highly unlikely for most functions.</p>