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

Gang of Satori

Name: Anonymous 2009-12-28 1:42

What is your favorite design pattern and why?

I dislike MVC but I keep using it!!!

Name: Anonymous 2009-12-29 14:25

>>12
No, static methods are a kludge to write procedural code in forced-OO languages.  Singletons are a way to share global state among a family of functions when initializing that state may be costly or impractical to do at load time, or may not be needed in every execution.  A non-OO language would solve this by requiring an init() call before the first use (which is prone to programmer error) or checking for a valid instance every time a related function is called (which is wasteful).  +sharedInstance exploits the type system to force an initialization check only when necessary.

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