3 ms·
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 a
by SillyUsername 1y ago
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
- layer8 1y agoLSP 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.
- SillyUsername 1y agoIn 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?