DIP 36: Rvalue References

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Apr 22 13:02:19 PDT 2013


On 4/20/13 11:17 AM, Namespace wrote:
>> I don't think adding more to the language is the sane thing to do
>> right now.
>
> Why not? Could you explain this?
> This issue is discussed since more than a year and it is a very annoying
> issue.
> And even if Walter and Andrei are of this opinion, it would still only
> polite when they explain in detail why they think this.

In a way I wish my not being polite would be the main bottleneck for 
this. I've been extremely busy at work, then preparing for DConf 2013, 
and last week has been quite distracting what with the Boston bombings 
three miles away from where we live and all that. It strikes me as odd 
to be obligated to spend time on something just because someone else 
did, and framed as impolite if I don't.

That being said, I have made a pass through this DIP and I have the 
following concerns about it.

1. It defines a new language feature instead of improving the existing 
ones. At this point in the development of the language, our preference 
should be putting the existing features in good order.

2. The proposal is sketchy and does not give many details, such as the 
lifetime of temporaries bound to scope ref objects.

3. The relationship with auto ref is insufficiently described, e.g. 
there should be clarification on why auto ref cannot be improved to 
fulfill the desired role.

4. Above all this is a new language feature and again we want to resort 
to adding new feature only if it is clear that the existing features are 
insufficient and cannot be made sufficient. In particular we are much 
more inclined to impart real, demonstrable safety to "ref" and to make 
"auto ref" work as a reference that can bind to rvalues as well as lvalues.


Andrei


More information about the Digitalmars-d mailing list