DIP 36: Rvalue References

Tove tove at fransson.se
Mon Apr 22 14:19:52 PDT 2013


On Monday, 22 April 2013 at 20:02:12 UTC, Andrei Alexandrescu 
wrote:
> 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.

Why isn't DIP36 "scope ref" be future compatible with a future 
safe "auto ref"?

... and if in the future the compiler would be able to infer 
"scope ref" from "auto ref", this entire DIP could be reused, 
with the benefit that people could start using this functionality 
already today(there is a full pull request with a very small 
delta), before the auto inference is in place.


More information about the Digitalmars-d mailing list