Re: Creating framework for singleton pattern?

From: Daniel O'Connell [C# MVP] (onyxkirx_at_--NOSPAM--comcast.net)
Date: 10/20/04


Date: Wed, 20 Oct 2004 17:13:54 -0500


"Nick Malik" <nickmalik@hotmail.nospam.com> wrote in message
news:rRudd.398781$mD.63412@attbi_s02...
>I respectfully disagree, Daniel.
>
> The Wiki page that I linked is one of hundreds of pages that call into
> question the usefulness, in the long run, of the Singleton pattern.
>
Perhaps it is, but its probably among the worst. That page is little more
than semi-technical rambling by people who may or may not know what they are
talking about.

No one argument is terribly convincing, no one argument is well formed, ane
no one argument covers all the bases. That page is as much scare tactics as
anything else.

Contrast it with the linked GLobalVariablesAreBad article, I thought that
one was conisderably better.

> I believe in "informed consent". That is, if someone is going to
> encourage
> me to engage in a risky behavior, they should have the integrity to share
> the risks with me beforehand. While I don't think it is wise to turn a
> valuable technical article into an opinion piece, the OO world has learned
> that this pattern is being widely misused... (and others as well,
> including
> Visitor, apparently). That learning should not be ignored just because
> it's
> not "technical" in nature.
>

No, it should not be. However, it also shouldn't be displayed as fact(or in
a way which suggests it is fact) as there is little to no proof provided
there. And again, I made a comment about not requiring a great deal of
research on the part of hte reader. If you start in on this "informed
consent" of yours in articles like Jon's, I fear you risk either becoming
biased towards one opinion or the other, or result in destroying the purpose
of the article trying to maintain the balance between the two and effectivly
swamping out the technical merit.

I do not think an informed decision can be made based only on negative
viewpoints. The wiki, on its own, is not informative, it is simply
inflammatory.

> To the contrary, attached to every set of instructions for how to
> correctly
> use household cleaner, there is a warning label about keeping it away from
> children. We should be willing to put a warning label on patterns as
> well... especially the ones that get more misuse than others.
>

*IF* those are actually misused and not just the vendetta of a small number
of loud people. There is an implicit lack of proof that Singletons are bad
and one article mention is not going to achieve that, its just going to make
opinion look like fact.



Relevant Pages

  • Re: Wikipedia & Music Theory
    ... reading by using the references, google, and my intelligence (such as ... reference to Wiki gives it more credibility than it earns. ... I don't necessarily come here to collect facts ... because usenet is a place where opinion is rife and fact hard to come ...
    (rec.music.theory)
  • 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)
  • Re: Wikipedia & Music Theory
    ... reading by using the references, google, and my intelligence (such as ... reference to Wiki gives it more credibility than it earns. ... I don't necessarily come here to collect facts ... because usenet is a place where opinion is rife and fact hard to come ...
    (rec.music.theory)
  • Re: Wikipedia & Music Theory
    ... Wiki provides me with a free, brief, high-level overview of topic X ... I don't necessarily come here to collect facts ... because usenet is a place where opinion is rife and fact hard to come ... but you can read Mein Kampf and make your own conclusions. ...
    (rec.music.theory)
  • Re: Creating framework for singleton pattern?
    ... The Wiki page that I linked is one of hundreds of pages that call into ... question the usefulness, in the long run, of the Singleton pattern. ... We should be willing to put a warning label on patterns as ... > doesn't require a considerable amount of research on the part of the ...
    (microsoft.public.dotnet.languages.csharp)