Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Singleton vs. static class

Name: Anonymous 2008-05-07 20:13

It seems all the object-oriented design guidelines say that if you want only one instance of a class to exist at any time, you should use a singleton. My question is, what are the advantages of using a singleton over simply using a class where all the member variables and methods are static?

Name: Anonymous 2008-05-07 20:23

"Global variable" would make a very poor name for a pattern.
And also some shit about being more adaptable when it turns out you really needed more than one, but then you'll be rewriting a lot of shit anyway.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List