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

> Inheritance chains were 5 or 10 classes deep.

30 years later, I still run into the same problem regularly. I'm not sure why, but this seems to be an anti-pattern that everyone needs to learn about the hard way.




I blame java


Don't blame Java. Blame programming instruction.

If it's anything like when I was in school, as soon as the curriculum trots out its first object oriented language, you get a lecture about how is-a relationships are the greatest invention since the compiler, and deep inheritance hierarchies are both the most practical and the most morally righteous way to organize your abstractions.

(Meanwhile, ironically enough, I'm not sure I've ever heard a CS instructor even mention the Liskov Substitution Principle.)


I blame inheritance.




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

Search: