Would like to see ref and out required for function calls

bearophile bearophileHUGS at lycos.com
Wed Sep 12 06:50:33 PDT 2012


Minas:

> g(&x); // passed by reference as well, but it is not explicit 
> like before. You don't even know if it's a const pointer if you 
> don't read the function's signature.

The presence of "&" at call site acts exactly like the "ref" at
the call site. In both cases you don't know if it's
const/immutable.

Bye,
bearophile


More information about the Digitalmars-d mailing list