Discussion Thread: DIP 1040--Copying, Moving, and Forwarding--Community Review Round 1
Atila Neves
atila.neves at gmail.com
Fri Mar 12 19:50:57 UTC 2021
On Wednesday, 10 March 2021 at 22:51:58 UTC, tsbockman wrote:
> On Friday, 5 March 2021 at 23:03:57 UTC, tsbockman wrote:
>> On Friday, 5 March 2021 at 12:19:54 UTC, Mike Parker wrote:
>>> [...]
>>
>> From the DIP:
>>> [...]
>>
>> Is the parameter to these methods really pass-by-value?
>> ...
>> If the parameter is, in fact, intended to be
>> pass-by-reference, then I must strenuously object to the
>> chosen syntax.
>
> Over in the feedback thread, Atila Neves also concluded that
> the syntax is misleading here:
>
> On Wednesday, 10 March 2021 at 21:27:25 UTC, Atila Neves wrote:
>> I eventually understood what this meant, but this confused me
>> when I read it the first time. I'd reword it to mention that
>> the syntax looks like a by-value parameter but ends up being
>> passed by reference. It also confused me that the 2nd function
>> had `ref` in there.
I didn't object to the syntax, especially since it's the same
syntax used right now for moves. I got confused by the
explanation, since it mixes syntax with the underlying mechanics.
More information about the Digitalmars-d
mailing list