Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I disagree with the suggestion that parent poster doesn't understand the benefits of polymorphism and encapsulation.

Polymorphism and encapsulation are perfectly achievable without the programming practices being criticized by them.

I don't think any sane developer would complain about having exchangeable/reusable HTML/PDF/??? generators. Funny enough, "PDF Generator" is also a very popular example of a "sane" micro-service.

The real problem starts when every single class in the application is given this treatment, even in the cases it doesn't make sense to make it replaceable. This problem is compounded by having very small classes that don't do much by themselves and have (hidden) dependencies with too many other classes. That's how you get the FactoryFactoryFactory problem.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: