title: Google's style guide about input/output parameters as pointers
body: <p>The <a href="http://google-styleguide.googlecode.com/svn/trunk/cppguide.html" rel="noreferrer">Google C++ Style Guide</a> draws a clear distinction (strictly followed by <a href="http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py" rel="noreferrer">cpplint.py</a>) between input parameters(→ const ref, value) and input-output or output parameters (→ non const pointers) :</p>
  
  <blockquote>
    <p>Parameters to C/C++ functions are either input to the function, output
    from the function, or both. Input parameters are usually values or
    const references, while output and input/output parameters will be
    non-const pointers.</p>
  </blockquote>
  
  <p>And further :</p>
  
  <blockquote>
    <p>In fact it is a very strong convention in Google code that input arguments are values or const references while output arguments are pointers.</p>
  </blockquote>
  
  <p>But I can't figure out why input/output arguments (I leave output arguments aside) should not be passed by reference. On stackoverflow there are plenty of topics related to this question : e.g. <a href="https://stackoverflow.com/questions/3967177/when-to-use-const-and-const-reference-in-function-args">here</a>, the accepted answer clearly say that </p>
  
  <blockquote>
    <p>it's mostly about style</p>
  </blockquote>
  
  <p>but that if</p>
  
  <blockquote>
    <p>you want to be able to pass null, you must use a pointer</p>
  </blockquote>
  
  <p>So, what's the point to <strong>always</strong> demand a pointer if I want to avoid the pointer to be null ? Why only use references for input arguments ?</p>