Re: Is this a good programming practice
Posted: Fri Dec 05, 2008 8:52 am
Singletons are not inherently globally available/changeable(at least no more than any other local variable)
SINGLETONS is just a desing pattern, you could store it globally, but that does not mean singletons are bad, just the programmer.
a physics engine in a game is a singleton design, you cant change the physics from the NPC class (unless you THE PROGRAMMER provide that functionality).
SINGLETONS is just a desing pattern, you could store it globally, but that does not mean singletons are bad, just the programmer.
a physics engine in a game is a singleton design, you cant change the physics from the NPC class (unless you THE PROGRAMMER provide that functionality).