inheriting constructos

Lionello Lunesu lio at lunesu.remove.com
Fri Dec 4 00:05:16 PST 2009


Perhaps reusing a constructor of an inherited class should be easier. 
Something like "alias this"? But how to refer to specific ctor overloads?

L.

On 30-11-2009 1:03, Andrei Alexandrescu wrote:
> Walter and I just discussed the matter of inheriting constructors. Our
> thought on the issue:
>
> a) If a class doesn't define any constructors and adds no fields,
> inherit constructors. Example:
>
> class MyException : Exception {}
>
> b) If a class defines at least one constructor, do not inherit
> constructors.
>
> c) If a class doesn't define any constructors but does add at least a
> non-static field -> undecided.
>
> What do you think?
>
>
> Andrei




More information about the Digitalmars-d mailing list