title: Why are static variables considered evil?
body: <p>I am a Java programmer who is new to the corporate world. Recently I've developed an application using <a href="http://en.wikipedia.org/wiki/Groovy_%28programming_language%29" rel="noreferrer">Groovy</a> and Java. All through the code I wrote used quite a good number of statics. I was asked by the senior technical lot to cut down on the number of statics used. I've googled about the same, and I find that many programmers are fairly against using static variables.</p>
  <p>I find static variables more convenient to use. And I presume that they are efficient too (please correct me if I am wrong), because if I had to make 10,000 calls to a function within a class, I would be glad to make the method static and use a straightforward <code>Class.methodCall()</code> on it instead of cluttering the memory with 10,000 instances of the class, right?</p>
  <p>Moreover statics reduce the inter-dependencies on the other parts of the code. They can act as perfect state holders. Adding to this I find that statics are widely implemented in some languages like <a href="https://en.wikipedia.org/wiki/Smalltalk" rel="noreferrer">Smalltalk</a> and <a href="http://en.wikipedia.org/wiki/Scala_%28programming_language%29" rel="noreferrer">Scala</a>. So why is this opposition to statics prevalent among programmers (especially in the world of Java)?</p>
  <p>PS: please do correct me if my assumptions about statics are wrong.</p>