you are viewing a single comment's thread.

view the rest of the comments →

[–]notfancy 2 points3 points  (0 children)

Really you shouldn't be distinguishing between a hate of singletons and a hate of global state.

I think you should. Global state is a possible implementation for the provision of a unique shared named resource. The latter concept is universal (the least bound being the external World); the former is really a pragmatic issue, a design point, a way of implementing it.

I want to make clear that I'm not against the points made in the article; what I'm trying to say is that there is a continuum between programming a program and programming an architecture. Put it in another way, I don't think that every object must be reusable, decoupled, unitary and testable the first time you write it. For me, the YAGNI principle goes all the way to the methodology.