still confused about call by reference
Bill Baxter
dnewsgroup at billbaxter.com
Mon Oct 29 11:31:29 PDT 2007
Jarrett Billingsley wrote:
> "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.
Also 'const inout' as a parameter doesn't make much sense either.
--bb
More information about the Digitalmars-d-learn
mailing list