Hacker News new | ask | show | jobs
by Dylan16807 1872 days ago
> A list containing two different subclasses of your avoiding-copy-paste base class is now most likely a logical error.

So don't allow those? Supporting inheritance doesn't mean you have to support heterogeneous lists.