Q:

Is there is a case when there is no any reasonable replacement for singleton design pattern?

Possible Duplicate:
When is Singleton appropriate? 

I've seen many explanations why is Singleton is evil. But is there really no such a case when Singleton is the only beautiful solution?

A:

want to hear a common myth?
"Singletons are a way to limit the number of instances of a certain class to one."
Yeah, right.
If that's how most people used singletons, the only thing I would have to say is "Well, why not just create ONE and stop there?"
But that's not the issue. The real problem here is that people use singletons to introduce global state to object-oriented programs, or just to shove in another (anti) pattern.
If you want to have a single instance of a certain class, that's perfectly fine. But why make it accessible from anywhere in your code? That's called opacity, my friend, and that's what you should watch out of.
Instead of using singletons, read up some more on dependency-injection and chain of construction (factories, etc). Depend on services (objects) you need. Don't try finding them by yourself (from the object's point of view) or access them globally.

