DIP 36: Rvalue References
Zach the Mystic
reachzach at gggggmail.com
Tue Apr 9 23:11:28 PDT 2013
On Wednesday, 10 April 2013 at 05:21:40 UTC, Manu wrote:
> Why are you suggesting changing scope to imply ref? This seems
> wrong. scope
> and ref are separate, should remain that way.
To be clear, I suggested it, not Kenji. The reason scope could
imply ref is that no value type is ever unsafe. 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.
More information about the Digitalmars-d
mailing list