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

Why has the singleton pattern been rejected? Similarly, why has the template method been rejected? Both seem entirely reasonable patterns to me - what is so wrong with them?


Never mind. The singleton pattern, I can see why it should be used judiciously - to my mind none of the arguments I've read are completely compelling.

However, the template method pattern I do understand now. Far better to define an interface, then inject an instance object that implements the interface and work on that.




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

Search: