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

That's not oxymoronic at all.

You have a Factory<T> interface. Depending on T and context, it may be reasonable to provide an implementation of Factory<T> that returns a singleton, something taken from an object pool, or a new instance of an object.

I haven't worked in an IoC-heavy world for awhile, but a SingletonFactory is neither silly nor an anti-pattern.



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

Search: