Hacker News new | ask | show | jobs
by jbverschoor 1211 days ago
Still better than nested classes and 50 different places where the code is. There are plenty of places where it makes more sense. Also in 'normal' code. It's about readability and maintainability. Classes mean -> extensibility, and is by definition more complex. Factoring out some functions make sense yes, but not the general mantra "if it's 5 lined it should be a function".

As Uncle Bob says (paraphrasing): Dependency injection (java) is just programming XML where you turned compiler errors into runtime errors