DIP 1014

12345swordy alexanderheistermann at gmail.com
Tue Jul 2 15:30:52 UTC 2019

On Tuesday, 2 July 2019 at 08:05:35 UTC, Tremor wrote:
> On Tuesday, 2 July 2019 at 07:19:10 UTC, Nicholas Wilson wrote:
>> That would go here:
>> https://github.com/dlang/dmd/blob/master/src/dmd/id.d#L63
> Thanks for the tips, I manage to made a patch: 
> https://paste.ofcode.org/xGnhS2KcXvtmENwyRPQXua
> The rest hard work is made the code to be call from 
> https://github.com/dlang/dmd/blob/b359735d1034c77aa5b59dff9a8b815fb3eb14c9/src/dmd/expression.d#L468 or  src/dmd/dinterpret.d (I need help here).
> On Tuesday, 2 July 2019 at 07:48:06 UTC, RazvanN wrote:
>> After implementing the copy constructor as a substitute for 
>> the postblit, we realized that the fundamental flaw that the 
>> postblit had (automatic copying) would also manifest in the 
>> case of opPostMove; in Shachars' there is no mention what 
>> happens when the source and destination are differently 
>> qualified. I suspect that before implementing the DIP we need 
>> to sort this out and it might be preferable to imlement a move 
>> constructor a la C++ rather then rely on automatic moving.
> Correct me if I am wrong.  I think the opPostMove should always 
> use for the same qualified type.  for example if a function 
> return a shared(struct), then the opPostMove  also accept 
> shared(struct) from a shared(struct) instance.
> Please feel free to use this patch 
> https://paste.ofcode.org/xGnhS2KcXvtmENwyRPQXua to made PR and 
> start the work.  I can made the PR but I am afraid this is all 
> I can do for this task(I will try, but I can not understand any 
> of dinterpret.d/expression.d).

Make the PR, so that others can review it.

More information about the Digitalmars-d mailing list