const ref parameters and r-value references
    bearophile via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Sun May  4 05:37:52 PDT 2014
    
    
  
Jonathan M Davis:
> Andrei suggested auto ref to fix this problem, and Walter 
> implemented it, but he misunderstood what Andrei had meant,
I missed this detail of the story :-)
> Walter has suggested that we just redefine ref itself to do 
> what I just
> described rather than using auto ref or defining a new 
> attribute. However,
> both Andrei and I argued with him quite a bit over that, 
> because that makes it
> so that you can't tell whether a ref argument is intended to 
> mutate what's
> being passed in, or whether it's just an optimization
I think Ada was designed like that, and then have had to fix the 
language. So it's not a good idea.
Bye,
bearophile
    
    
More information about the Digitalmars-d-learn
mailing list