2 ms·
You don't have that guarantee with interfaces either - you're trusting that the developer isn't lying to you. My experience is that I've more often run into dev
by vidarh 8y ago
You don't have that guarantee with interfaces either - you're trusting that the developer isn't lying to you. My experience is that I've more often run into developers that have artificially barred me from doing what I wanted by checking for a given class, than that I've accidentally passed in something that satisfies a given type but does something different.
- klmr 8y ago> You don't have that guarantee with interfaces either True, but you can give the interfaces/contracts proper names (or namespaces). To use the example in the parent comment, `Array` and `Keyboard` wouldn’t implement the same contract even if both have a `Shift` method.