Singleton pattern in D
David Ferenczi
raggae at ferenczi.net
Fri May 11 10:14:20 PDT 2007
> Final point: just make sure you actually need singleton. I've seen a
> lot of people using singleton for a single class, which would be more
> efficiently handled by a static class.
Can you mention some godd and bad examples?
I use singleton pattern e.g. for the application class (command line
interface), configuration class (configuration handling), an log class
(logging).
Regards,
David
More information about the Digitalmars-d-learn
mailing list