Link Details

Link 123889 thumbnail
User 251548 avatar

By djo.mos
via suereth.blogspot.com
Published: Oct 08 2008 / 08:27

Some of you may be wondering why I'm writing about fundamentals of mechanical engineering. Actually, This posting is about statics in programming. Other words sometimes used for statics are globals, singletons or pure evil. The goal of this post is to show why you should avoid statics/globals/singletons in your own code, and what you can gain by doing so.
  • 12
  • 9
  • 2537
  • 0

Comments

Add your comment
User 211643 avatar

zynasis replied ago:

1 votes Vote down Vote up Reply

is this a joke? if it is, you fail at humor.

if it isnt a joke... please stop spreading idiotic rants

User 179375 avatar

Ricky Clarkson replied ago:

-1 votes Vote down Vote up Reply

It looks like what he's saying is that singletons are ok if you don't have mutable data in them or make their methods have (uncontrolled) side effects. Isn't that true of much of programming?

(comment repeated on the blog)

User 218789 avatar

eelmore replied ago:

0 votes Vote down Vote up Reply

Singletons have their uses... albeit not as often as a novice might think.

User 306333 avatar

daveschinkel replied ago:

0 votes Vote down Vote up Reply

zynasis, why don't you reveal your real name and stop hiding behind your alias while you make these weak comments?

User 211643 avatar

zynasis replied ago:

-1 votes Vote down Vote up Reply

what difference is it going to make if i post under my real name?
the answer: none
diaf

User 350084 avatar

Joshua.Suereth replied ago:

0 votes Vote down Vote up Reply

If you offer up meaningful comments, I'm willing to discuss. Otherwise, I'm going to perpetuate the stupidity of meaningless arguments: http://www.xkcd.com/481/

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Spring Integration
Written by: Soby Chacko
Featured Refcardz: Top Refcardz:
  1. Search Patterns
  2. Python
  3. C++
  4. Design Patterns
  5. OO JS
  1. PhoneGap
  2. Spring Integration
  3. Regex
  4. Git
  5. Java