|
|
|
|
|
by AnimalMuppet
4241 days ago
|
|
Here's a (very contrived) example of what I think you mean. Here's a container interface. It has a sort() method, which sorts the elements of the container. Here's a different container interface. It's got a method that tells you what kind of concrete container you have, so you can understand how expensive actions like insert and sort are going to be. But the author was from England, and so called that method "sort". You can see how that's going to (fail to) work out when you define a "sortable" interface... |
|
Traditional (but even more contrived) examples include "draw" and "fire" doing unexpected things when applied to a gun as opposed to an image or an employee.