rvalue references

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Apr 23 07:28:55 PDT 2013


On 4/23/13 6:39 AM, Dicebot wrote:
> On Tuesday, 23 April 2013 at 10:07:57 UTC, Namespace wrote:
>>> No it is not the only difference. "scope ref" (as proposed in DIP35)
>>> is more restrictive in usage - can't take address of it, can't return
>>> it, can't implicitly cast it to normal ref. It is "scope" primarily
>>> and "rvalue ref solution" only secondarily.
>>
>> My initial reason was to solve the rvalue ref issue. So it is
>> completly inverse for me. :-)
>
> And I initially ignored all the threads you have started until noticed
> proposal that looked fundamental enough in its nature. :) Features
> created to support one specific use case usually are not worth it. DIP36
> as far as I see it is much more about scope than about rvalues.

If it were about scope it would be very careful with lifetime of 
temporaries.

Andrei


More information about the Digitalmars-d mailing list