title: Why is return type before the function name?
body: <p>The new C++11 standard adds a new function declaration syntax with a trailing return type:</p>
  
  <pre><code>// Usual declaration
  int foo();
  
  // New declaration
  auto foo() -&gt; int;
  </code></pre>
  
  <p>This syntax has the advantage of letting the return type be deduced, as in:</p>
  
  <pre><code>template&lt;class T, class U&gt;
  auto bar(T t, U u) -&gt; decltype(t + u);
  </code></pre>
  
  <p>But then <strong>why the return type was put before the function name in the first place?</strong> I imagine that one answer will be that there was no need for such type deduction in that time. If so, is there a reason for a hypothetical new programming language to not use trailing return type by default?</p>