DIP 1022--foreach auto ref--Community Review Round 1

Exil Exil at gmall.com
Thu Aug 8 14:04:30 UTC 2019


On Thursday, 8 August 2019 at 12:44:23 UTC, Dukc wrote:
> On Thursday, 8 August 2019 at 12:35:45 UTC, Exil wrote:
>>
>> Not sure if "foreach( ref" should be deprecated.
>
> I'm not quite sure what you meant, but if you're afraid that 
> the DIP will deprecate foreach-ref in whole, no. It will only 
> deprecate foreach-ref with rvalues. Auto ref will work exactly 
> as ref does now.

Like I said in the rest of the paragraph. It restricts it 
unncecssarily if.you deprecate it. You can't specify the type if 
you only allow "auto ref". There's no reason to deprecate it. So 
no, it does not work exactly as ref does now cause it won't work 
at all in some instances such as when using opApply.


More information about the Digitalmars-d mailing list