Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

1
  • 9
    I don't think this is a great example because it may lead inexperienced people to think that if two classes have a .foo() method, then they should share a common interface. However, this isn't true and leads to incorrect abstractions. An interface should define a role that is to be played, which may have many different implementations, but all pull from the same set of input and return something from the same set of output. The input into a x.cut(...) for a surgeon, stylist, or actor aren't the same, and neither is the output. Commented Jan 27, 2017 at 5:49