Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The answer is that you retain A as a pure interface and maybe you add a convenience base below A that adds the data member, then you inherit from from the convenience base for your 70 leaf classes. You can also use CRTP for the convenience base, if it's appropriate. You can still avoid confusing interface and implementation inheritance.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: