Call site 'ref'

bearophile bearophileHUGS at lycos.com
Sun Jan 15 11:30:39 PST 2012


Robert Jacques:

> 1) Adding ref to the call site is lexically similar to Hungarian notation and has all the drawbacks and advantages thereof.

The presence of "ref" at the call site is meant to be enforced by the type system of the compiler.


> Or more to the original point, modern IDEs already list function parameter's type and type modifiers (i.e. aka) as you type the function in so it's _always_ obvious what is ref/const/etc and what is not.

C# is meant to be used with a modern IDE, yet it requires "ref" and "out" at the call site (but in some cases, where the use of ref is pervasive).

Bye,
bearophile


More information about the Digitalmars-d mailing list