Deprecating this(this)

ag0aep6g anonymous at example.com
Sun Apr 1 12:55:07 UTC 2018


On 04/01/2018 03:08 AM, Andrei Alexandrescu wrote:
> On 3/31/18 8:32 PM, H. S. Teoh wrote:
[...]
>> What exactly is it about this(this) that blocks us from doing that?
> 
> See the updated docs. Too many bugs in design and implementation.
> 
>> Removing this(this) is going to be a huge breaking change far bigger
>> than, say, removing autodecoding ever will be.
> 
> We're not removing it as much as evolving it: we define an alternate 
> copying mechanism, and once that is in tip-top shape, we deprecate 
> this(this).

Is there a fundamental flaw in the postblit idea, or are you just going 
to give postblit a new syntax, and try to avoid all the issues that 
`this(this)` currently has?

If there's a fundamental flaw, I'd be interested in what it is. I can't 
make it out in your additions to the spec, if it's in there. I can see 
that `this(this)` is  a mess, but it also looks like a lot could be 
fixed. For example, how it interacts with const/immutable is ridiculous, 
but that could probably be fixed.

If you're just going for a clean slate, I can see the appeal. You avoid 
dealing with the hard breakage that fixing `this(this)` would most 
probably bring.


More information about the Digitalmars-d mailing list