super constructors question

Serg Kovrov kovrov at no.spam
Sun Aug 13 14:28:48 PDT 2006

Jarrett Billingsley wrote:
> "Serg Kovrov" <kovrov at no.spam> wrote in message 
>> But i do not understand intension. Is it so hard for compiler to find
>> suitable constructor in base class(es)?
> It's not really trivial.  Basically the rule would have to change so that if 
> a class were defined without any ctors, it would have to create a ctor for 
> each ctor that the base class has, and forward the parameters.  So your code 
> would insert an implicit "this(char[] name) {super(name);}" in FooBar.  That 
> seems like a little too much automation for very rarely any real benefit. 
> Most of the time you're going to be making new constructors for the derived 
> class anyway, so it's kind of a niche problem. 

Personally I do not see it as too much automation, but a little bit 
source code overhead. I believe Walter cares about unnecessary typing 


More information about the Digitalmars-d-learn mailing list