<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2013/4/18 Walter Bright <span dir="ltr"><<a href="mailto:newshound2@digitalmars.com" target="_blank">newshound2@digitalmars.com</a>></span><br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On 4/16/2013 8:22 AM, Andrei Alexandrescu wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
There's a discussion that may be of interest to the larger community:<br>
<a href="https://github.com/D-Programming-Language/dmd/pull/1877" target="_blank">https://github.com/D-<u></u>Programming-Language/dmd/pull/<u></u>1877</a><br>
</blockquote>
<br></div>
What do you think of this:<br>
<br>
     typeof(return) foo(int x) { return x; }<br>
<br>
? That would only infer the return type, not the attributes.<br>
</blockquote></div><br></div><div class="gmail_extra">It will break existing code.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra">int foo() {</div><div class="gmail_extra">    typeof(return) bar() { return 1; }</div>
<div class="gmail_extra">    return bar();</div><div class="gmail_extra">}</div><div><br></div><div>typeof(return) represents the return type of foo, that is int.<br></div><div><br></div><div>Kenji Hara</div></div></div>