10 ms·
Hmm, interesting view. But why would you want to model is-a relationships? Other than to share code?
by justincormack 14y ago
Hmm, interesting view. But why would you want to model is-a relationships? Other than to share code?
- AndrewDucker 14y agoThink of it as enforced documentation. If I say that my object is a Customer then I know what can be done with it. If I have a method that says it takes a Customer object then the calling point knows what to pass in, and my method knows it can rely on that object satisfying certain conditions. Basically it removes (some of) the need to document separately, and it enforces that the documentation is adhered to.