still confused about call by reference
Jarrett Billingsley
kb3ctd2 at yahoo.com
Mon Oct 29 05:52:45 PDT 2007
"Nathan Reed" <nathaniel.reed at gmail.com> wrote in message
news:fg40ac$2fuo$1 at digitalmars.com...
>
> Honestly, I'm not entirely sure what D's 'ref' parameter-storage class is
> for, since AFAICT all the uses of pass-by-reference are covered by in,
> out, and inout.
'ref' is an alias of 'inout' at least for the time being. It was introduced
for forwards compatibility, as it seems likely that we will be getting
reference returns, and returning an 'inout' doesn't really make much sense.
More information about the Digitalmars-d-learn
mailing list