title: Google C++ Style Guide. Why input-then-output parameter ordering?
body: <p>In <a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.html#Function_Parameter_Ordering" rel="noreferrer">Google C++ Style Guide</a>, it said:</p>
  
  <blockquote>
    <p>When defining a function, parameter order is: inputs, then outputs.</p>
  </blockquote>
  
  <p>Basically Google suggest function parameter ordering like:</p>
  
  <pre><code>void foo(const Foo&amp; input1, const Foo&amp; input2, Foo* output);
  </code></pre>
  
  <p>However, my colleague suggested that the output should be put in the first position. because in this way, foo could accept default values and most of the time output would not use a default value. for example:</p>
  
  <pre><code>void foo(Foo* output, const Foo&amp; input1, const Foo&amp; input2 = default);
  </code></pre>
  
  <p>I think what he said make sense. Or is there something we are missing here from aspects of readability, performance, ...? Why the style guide suggest output should be the last?</p>