<div dir="ltr">On 10 April 2013 16:11, Zach the Mystic <span dir="ltr"><<a href="mailto:reachzach@gggggmail.com" target="_blank">reachzach@gggggmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wednesday, 10 April 2013 at 05:21:40 UTC, Manu wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Why are you suggesting changing scope to imply ref? This seems wrong. scope<br>
and ref are separate, should remain that way.<br>
</blockquote>
<br></div>
To be clear, I suggested it, not Kenji. The reason scope could imply ref is that no value type is ever unsafe.</blockquote><div><br></div><div style>It is though, in the case I demonstrated. A value type can aggregate a reference type, and by-val scope would prohibit any part of the copy from escaping in turn.</div>
<div style>This is tricky, but I think it would be an important enhancement for non-ref scope variables and @safe-ty.</div><div style>It might be impractical, but it's something to think about anyway...</div><div><br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> If you copy the value you're passing, there's no way the reference could escape the scope, because there's no reference! A delegate has an implicit pointer and is inherently a reference type, which is why it can work with 'scope'. In all likelihood 'scope' implying 'ref' would needlessly complicate the type system, in exchange for the convenience of only having to type either 'scope' or 'ref' depending on what you wanted. But I suggested it because I at least wanted it to be discussed.<br>
</blockquote></div><br></div><div class="gmail_extra" style>Fair enough.</div></div>