rvalue references

anonymous anonymous at example.com
Tue Apr 23 12:05:17 PDT 2013


On Tuesday, 23 April 2013 at 14:25:36 UTC, Andrei Alexandrescu 
wrote:
>> Now, this may be too naive, but what about allowing the 
>> compiler to pass
>> regular (not declared ref) const arguments per reference as it 
>> sees fit?
>> It would be just another optimization.
>>
>> I'd declare function(const arg) and that would be it.
>
> Aliasing would kill that. We considered it.
>
> Andrei

I assume you're talking about this:
http://forum.dlang.org/post/4F8C93A4.10007@erdani.com

I guess, "difficult to figure" means that the notorious 
sufficiently smart compiler is unrealistic. Too bad, because I 
don't like the idea of adding verbosity (auto ref) for the common 
case. pure and @safe already have that flaw, and I'd rather see 
no more semi-compulsory keywords.


More information about the Digitalmars-d mailing list