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

Agreed, and I conflated the two since I've been describing SOLID in ways other devs in my team would understand for years.

Liskov substitution for example is an overkill way of saying don't create an implementation that throws an UnsupportedOperationException, instead break the interfaces up (Interface Segregation "I" in SOLID) and use the interface you need.

Quoting the theory to junior devs instead just makes their eyes roll :D




LSP is about much more than not throwing UnsupportedOperationException, that’s a complete mischaracterization.

ISP isn’t about avoiding UnsupportedOperationException as well, it’s about reducing dependencies.


In Java land this is really the closest analogy I could create an example for. Do you have better example I could use with Java pls?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: