title: Why does C++ allow unnamed function parameters?
body: <p>The following is a perfectly legal <code>C++</code> code</p>
  
  <pre><code>void foo (int) {
      cout &lt;&lt; "Yo!" &lt;&lt; endl;
  }
  
  int main (int argc, char const *argv[]) {
      foo(5); 
      return 0;
  }
  </code></pre>
  
  <p>I wonder, if there a value to ever leave unnamed parameters in functions, given the fact that they can't be referenced from within the function.</p>
  
  <p>Why is this legal to begin with?</p>