Hacker News new | ask | show | jobs
by flukus 2558 days ago
Because static methods/variables/things are hard to test code with because they're hard to replace. IME getting rid of static is the wrong solution though, the difficulty is only because of a limitation of current languages, unit test frameworks and build systems. If you can inject your substitutes at compile time (which I think you should be able to do at the test link step with java) then static isn't a problem.

There's also the issue of people seeing OO as the goal not the tool, which I think might be the case here too.