Static methods vs singletons [duplicate]
Possible Duplicate:
Why choose a static class over a singleton implementation?
Static methods vs singletons.
Could it be determined choice here? What are conditions in which one of these approaches is definetely more suitable then other?Static methods follow the "low coupling and high coherence"-rule more than singletons do. (As long as their implementations don't rely on static member variables.)
If the static methods solve the same problem as the singleton, then why complicate and write a singleton?
Otherwise, why choose something that solves the wrong problem?
精彩评论