3 ms·
LSP (the 'L' in SOLID) gets a bad rap only because it's typically couched in terms of classes and inheritance these days. However, if you know anything about Ba
by talideon 10y ago
LSP (the 'L' in SOLID) gets a bad rap only because it's typically couched in terms of classes and inheritance these days. However, if you know anything about Barbara Liskov's work, you'll know that's entirely the wrong tack to take.
If you're just using interfaces, it boils down to this: if two things implement the same interface, you should be able to substitute one for the other without it breaking everything.
So no, it's neither confusing nor difficult, except in so far as maintaining substitutability requires discipline.
'I' is something that's already encouraged within the Go community.