Singleton pattern in D
David Ferenczi
raggae at ferenczi.net
Fri May 11 11:51:52 PDT 2007
Bill Baxter wrote:
> David Ferenczi wrote:
>>> 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).
>
> Good ole Yegge comes through again here with another beautiful rant:
> http://steve.yegge.googlepages.com/singleton-considered-stupid
An interesting read. Thank you.
More information about the Digitalmars-d-learn
mailing list