Should out/ref parameters require the caller to specify out/ref like in C#?

ketmar via Digitalmars-d digitalmars-d at puremagic.com
Sun May 28 12:10:49 PDT 2017


Meta wrote:

> If a parameter is marked as ref then you have to assume it will be 
> modified by the function (unless it's const/inout/immutable). If it's 
> marked as out then you know it will be. If you didn't know that the 
> function takes its parameters by ref or out... You're should've RTFM.

now imagine that you're reading some code:

	foo(a);

vs:

	foo(ref a);

which code style is easier to read without constant jumping into 
documentation?


More information about the Digitalmars-d mailing list