|
|
|
|
|
by vjerancrnjak
867 days ago
|
|
It means the object created by NewServer is dealing with too much. Probably has too many data types coupled to it and too much behavior. Simple example is adding a logger. If you add it as a dependency to the constructor, the object starts doing a bit more than initial simple implementation. It's fine to do it, but shame to not figure out how to log without editing the implementation of a simple thing. Higher order functions (a logger decorator) get there to allow composition, but even they have their drawbacks. It's still some form of structure that you can deal with, not a mistake. |
|