Hacker News new | past | comments | ask | show | jobs | submit login

In Sean Parent's 'Inheritance is the base class of evil' talk Sean outlines an interesting way to achieve runtime polymorphism without inheriting interfaces in C++.

https://www.youtube.com/watch?v=bIhUE5uUFOA




But he uses interface inheritance.

You see it at 9:44. Where he creates the concept_t and int_model_t inherits from it.


Indeed. But the original type isn't 'burdened' with the interface. I've used the technique for a simple audio signal processing chain.




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

Search: