Re: Can use of singletons denote poor project design?



Daniel Parker wrote:

I don't really see how there are any special issues for writing unit
tests for singletons.

Someone on comp.lang.c++ just pointed out, very politely, "I think you just
like using global variables because you're lazy".

That's the same point as mine, without the test cases illustrating the
problem.

--
Phlip
http://www.greencheese.org/ZeekLand <-- NOT a blog!!!
.



Relevant Pages

  • Re: Can use of singletons denote poor project design?
    ... Phlip wrote: ... tests for singletons. ... like using global variables because you're lazy". ...
    (comp.object)
  • Re: Global variables
    ... >> Do you tend to rely on global variables, or do you shun them completely, ... > holding some state variables that is reachable via some relationship ... > solution" is dictated by the problem space rather than being a developer ... > Without Singletons, the actual instances one can reach via relationship ...
    (comp.object)
  • Re: Singletons
    ... > Ilja Preuß wrote: ... >> quite clear that Beck doesn't like Singletons. ... provide global variables in languages without global variables? ...
    (comp.object)
  • Re: Singletons
    ... >> Is that because he doesn't like singletons or because it's easier to ... >> use class variables? ... > The book has a chapter on a number of design patterns, ... > provide global variables in languages without global variables? ...
    (comp.object)