DIP 1004 Preliminary Review Round 1
Basile B. via Digitalmars-d
digitalmars-d at puremagic.com
Tue May 2 03:24:33 PDT 2017
On Monday, 1 May 2017 at 16:08:36 UTC, Andrej Mitrovic 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.
Then i have nothing to say and you can count me as a supporter of
this DIP. As a personal matter i don't even care about the
problem that's to have the ability to select a restricted set
among the __ctors of the base.
About protection attributes i think that the rules applied to OOP
should be followed. Private __ctors can only be inherited in
derived if derived is in the same module, otherwise not.
Protected and public __ctors can always be inherited. Package
__ctors can be inherited in the same package.
Note that i always wondered why in the first place constructors
and destructors were not designed to be virtual functions, like
in other languages...
More information about the Digitalmars-d
mailing list