<br><div class="gmail_extra"><br><br><div class="gmail_quote">On 9 November 2012 00:44, Jonathan M Davis <span dir="ltr"><<a href="mailto:jmdavisProg@gmx.com" target="_blank">jmdavisProg@gmx.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Thursday, November 08, 2012 21:49:58 Manu wrote:<br>
> That's cute, but it really feels like a hack.<br>
> All of a sudden the debugger doesn't work properly anymore, you need to<br>
> step-in twice to enter the function, and it's particularly inefficient in<br>
> debug builds (a point of great concern for my industry!).<br>
><br>
> Please just with the compiler creating a temporary in the caller space.<br>
> Restrict is to const ref, or better, in ref (scope seems particularly<br>
> important here).<br>
<br>
</div>I honestly wish that in didn't exist in the language. The fact that it it's an<br>
alias two different attributes is confusing, and people keep using it without<br>
realizing what they're getting into.</blockquote><div><br></div><div>I understand it's an alias for 'const scope', but what's this about scope not working correctly? What's wrong with it?</div><div>
It seems like precisely what you want in this case... you don't want a temporary escaping the function you pass it to.</div><div>What's the problem?</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If scope worked correctly, you'd only<br>
want it in specific circumstances, not in general. And since it doesn't work<br>
correctly aside from delegates, once it _does_ work correctly, it'll break<br>
code all over the place, because people keep using in, because they like how<br>
it corresponds with out or whatever.<br></blockquote><div><br></div><div>I like how it promises that the thing I pass can't escape the callee, not that it's the natural english compliment to 'out'.</div></div>
</div>