|
|
|
|
|
by skybrian
1578 days ago
|
|
An interface with many methods can have the same problem. If the function doesn't actually use every method in the interface, do you really need to implement them all? So then it might be better for the function to declare its own interface with just the methods it uses? But then, all the callers need to be changed if you decide to call another method. There's no principled solution to predicting what dependencies code might need someday. It's a matter of taste. |
|