Should certain abstract classes be instantiable?

Jarrett Billingsley jarrett.billingsley at gmail.com
Thu Oct 1 16:47:02 PDT 2009


On Thu, Oct 1, 2009 at 4:30 PM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Consider:
>
> class A {
>    abstract void fun() {}
> }
>
> The class defines a function that is at the same time abstract (so it
> requires overriding in derivees) and has implementation.
>
> Currently the compiler disallows creation of objects of type A, although
> technically that is feasible given that A defines the abstract method.
>
> Should A be instantiable? What designs would that help or hinder?

Uh... why?



More information about the Digitalmars-d mailing list