Explicitly saying ref or out when invoking a function

Nick Sabalausky a at a.a
Tue Aug 11 21:35:20 PDT 2009


"Jeremie Pelletier" <jeremiep at gmail.com> wrote in message 
news:h5sl4c$1733$1 at digitalmars.com...
> Ary Borenszweig Wrote:
>
> It's especially bad since if you modify the function prototype and change 
> ref, you have all your calls to update too.

I'd consider that a benefit. If I have a function:

void foo(int x)
{
    x += 2;
    writefln(x);
}

and change that param to a ref, then I *absolutely* want all my calling code 
to raise holy hell about it. 





More information about the Digitalmars-d mailing list