title: const float & x = something; // considered harmful?
body: <p>There was some code like this:</p>
  
  <pre><code>// Convenience to make things more legible in the following code
  const float &amp; x = some.buried.variable.elsewhere;
  
  // Go on to use x in calculations...
  </code></pre>
  
  <p>I have been told that the "const float &amp;" is "bad" and should just be a plain float or const float.</p>
  
  <p>I, however, could not think of a compelling reason other than "you don't have to type '&amp;'".</p>
  
  <p>In fact, it seems to me that in some cases the original could be better, since compiler might not allocate extra stack space to the variable.</p>
  
  <p>In other words, originally I could validly say:</p>
  
  <pre><code>assert(&amp;x == &amp;some.buried.variable.elsewhere)
  </code></pre>
  
  <p>Whereas in the second case I cannot.</p>
  
  <p>Also, the original seems to communicate intent better, in my view, since the whole point of a reference is to make an alias to another value.</p>
  
  <p>Can anyone give me examples of where the "const float &amp;" version is worse than a plain "float" or "const float" in some tangible way?</p>