transporting qualifier from parameter to the return value

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Dec 19 11:52:29 PST 2009


Steven Schveighoffer wrote:
> On Fri, 18 Dec 2009 22:18:36 -0500, Leandro Lucarella <llucax at gmail.com> 
> wrote:
> 
>> Looks like inout won:
>> http://www.dsource.org/projects/phobos/changeset/1389
>>
>> Doesn't look like a very intuitive name though (another enum? :).
>>
> 
> Better than not having the feature :)
> 
> Some notes on the to-be description:
> 
> There is no mention that inout variables cannot be changed (they cannot).
> 
> In the paragraph describing what inout resolves to on return, if all 
> matches are inout, then the return type should be set to inout, not 
> const.  This is important for calling inout functions from within inout 
> functions.
> 
> I'm really excited to finally see this coming to fruition!  Thanks 
> Walter and Andrei!

Thank you for your detailed inout proposal and for making us understand 
the details of what it takes to define inout.

Andrei



More information about the Digitalmars-d mailing list