[dmd-beta] rvalue references

Sean Kelly sean at invisibleduck.org
Mon Apr 16 11:31:19 PDT 2012


On Apr 16, 2012, at 6:32 AM, Steve Schveighoffer wrote:
> 
> Regardless of the solution, I think we need to designate two different situations:
> 
> 1. I want to pass this by reference because it's more efficient
> 2. I want to pass this by reference because I want to change it

Ideally, no one should ever specify "ref" simply for efficiency.  The programmer should choose semantics for logical reasons, and leave optimization up to the compiler.  That may still not be practical however.


More information about the dmd-beta mailing list