Things that keep D from evolving?

rsw0x via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Feb 12 09:20:23 PST 2016


On Friday, 12 February 2016 at 15:12:19 UTC, Steven Schveighoffer 
wrote:
> On 2/12/16 9:37 AM, Matt Elkins wrote:
>> [...]
>
> Pass by reference and pass by value means different treatment 
> inside the function itself, so it can't differ from call to 
> call. It could potentially differ based on the type being 
> passed, but I'm unaware of such an optimization, and it 
> definitely isn't triggered specifically by 'in'. 'in' is 
> literally replaced with 'scope const' when it is a storage 
> class.
>
> -Steve

note that 'in' and 'scope'(other than for delegates) parameter 
storage class usage should be avoided.
It really should be a warning.


More information about the Digitalmars-d-learn mailing list