Feedback Thread: DIP 1040--Copying, Moving, and Forwarding--Community Review Round 1

Walter Bright newshound2 at digitalmars.com
Sat Mar 20 08:04:11 UTC 2021


On 3/18/2021 4:22 PM, deadalnix wrote:
> On Friday, 5 March 2021 at 12:20:36 UTC, Mike Parker wrote:
>> [...]
> 
> Looking at how the discussion is going, this seems to me like this DIP should be 
> split into two DIPs because it's really doing two things. One of these things 
> seems to generally be agreed upon, while the other is quite intensively discussed.
> 
> 1/ The transformation of copy/destruct couples into move if the object isn't 
> used in between the copy and the destruction. This seems to be fairly 
> uncontroversial and the proposal is sound.
> 
> 2/ The addition of new move constructor/assignment operators. There seems to be 
> a lot of discussion around these, and I am myself not convinced that the design 
> is sound.
> 
> Splitting this DIP in two would allow to move forward with 1/ relatively quickly 
> and provide value to D user right away, while providing time and space for 2/ to 
> ironed out.

While this is an attractive idea, (1) without some help from the programmer via 
adding the Move functions seems likely to cause problems.


More information about the Digitalmars-d mailing list