Binding rvalues to ref parameters redux
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Thu Mar 28 16:14:04 UTC 2019
On 3/28/19 10:36 AM, bitwise wrote:
> On Wednesday, 27 March 2019 at 01:38:40 UTC, Andrei Alexandrescu wrote:
>> Work has been underway on redoing DIP 1016. I haven't made a pull
>> request yet as it's a bit early. Looking for high-level observations:
>>
>> https://gist.github.com/andralex/e5405a5d773f07f73196c05f8339435a
>>
>> Thanks in advance for any feedback.
>
> From the response to DIP 1016:
>
>> Here, the DIP Author clearly expresses two reasons why a programmer
>> may choose to declare a function to accept `ref` arguments. The
>> Language Maintainers see this as the core of the proposal and would
>> expect the distinction between the two cases to be maintained
>> throughout. [However, this proposal does not maintain the distinction
>> and instead conflates the two][1] cases. The Language Maintainers
>> insist that any proposal allowing `ref` parameters to accept rvalue
>> references must clearly define how functions which make use of `ref`
>> for side effects will not accept rvalues.
>
> I don't see anything in the new DIP that addresses the above issue. [1]
The nonassignability requirement addresses it.
More information about the Digitalmars-d
mailing list