|
|
|
|
|
by jvans
1229 days ago
|
|
There's a long list of things that I think are abused in an effort to save on some vaguely defined future cost that never seems to materialize. Some things off the top of my head: * Interfaces(particularly in java) that have 1 implementation. * Interfaces with many implementations but where each implementation is used in exactly 1 place. * large inheritance hierarchies with generic type parameters. I'm sure there's a good use case for this but
it's usually a pain. * Writing "generic" code in an effort to make something re-usable when in reality the code has knowledge of every location it is used in and tightly couples all implementations |
|
With an interface I know that only that method can be called. If a class is passed in i have no idea what methods going to be used. It also gives me a better feeling that the coder has in mind what they need a parameter to do without worrying that they are going to rely on a couple of othogonal methods to be called.