DIP 1004 Preliminary Review Round 1

H. S. Teoh via Digitalmars-d digitalmars-d at puremagic.com
Mon May 1 11:34:43 PDT 2017


On Mon, May 01, 2017 at 04:08:36PM +0000, Andrej Mitrovic via Digitalmars-d wrote:
> On Monday, 1 May 2017 at 15:33:47 UTC, Basile B. wrote:
> > On Monday, 1 May 2017 at 14:55:28 UTC, Mike Parker wrote:
> > > DIP 1004 is titled "Inherited Constructors. [...]
> > > All review-related feedback on and discussion of the DIP should
> > > occur in this thread. [...]
> > > Destroy!
> > 
> > An obvious omission in the syntax variations [1]
> > 
> > - alias this() = super.this();
> > 
> > or
> > 
> > - alias this = super.this;
> 
> I thought people would catch on that this is implied. :) The old-style
> or new-style alias syntax should both be allowed, in my opinion. The
> main issue is what to do about the parentheses, whether to include
> them or not.

I don't think new-style syntax is supported for `alias X this;`. I
vaguely remember in the original discussions when new-style alias syntax
was first introduced, that we decided against allowing `alias this = X;`
because alias this held a special meaning that's different from the
usual alias declaration, so the fact that they now have different
syntaxes was seen as an advantage.


T

-- 
Тише едешь, дальше будешь.


More information about the Digitalmars-d mailing list