Singletons



Hi,

What would in your opinion be the justified case for singletons?

I have seen (and written :-( ) code which relies far too heavily on singletons and this cannot bring anything good. At this point in time, I'm somewhat on the other extreme - I'm not sure at all if singleton is good idea in any situation.

Which examples would you provide as appropriate for singletons?

Regards,
Sasa
.



Relevant Pages

  • Re: Singletons
    ... What would in your opinion be the justified case for singletons? ... I have seen code which relies far too heavily on ... I agree singletons and statics get used wrongly, ... You can only have one game running per graphics context ...
    (comp.object)
  • Re: Creating framework for singleton pattern?
    ... consider XP to mean any test driven practice. ... >> people use singletons and static members is a testimony to that. ... That is the arena of an opinion piece, ... > practice without a warning is making a statement of opinion just as much ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Creating framework for singleton pattern?
    ... > Opinion is the name of the game, and, IMHO, previously insufficent ... > was presented to base an article warning off of. ... I agree that the wiki page was, by itself, insufficient to make an argument. ... > people use singletons and static members is a testimony to that. ...
    (microsoft.public.dotnet.languages.csharp)