Singletons and global state

August 27, 2008 by Glen. Filed under programming.

A very useful article from Google’s Miško Hevery about the problems with the Singleton design pattern. Essentially, Singleton’s rely on a global instance variable which could point to any number of other variables, thus creating a global state. This causes problems when you want to test your code.

  • Share/Bookmark

Tags: , , , ,

Add a comment

Follow comments to this post by subscribing to the comment feed.