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

In fairness, the Factory pattern is useful when you want to unit test classes with mocks. In dynamic languages, this is easy, but more static languages require jumping through hoops.

Alternately, you could use something like Google Guice, but that's (sorta) a factory-factory.

Basically, no one likes the situation, but they've chosen their tradeoffs, which they see as the lesser of N evils.



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

Search: