3 ms·
Factory is just a function. It can easily instantiate and return singleton. You just call it instead of using `new` on it at the place of use. It's probably not
by scotty79 11y ago
Factory is just a function. It can easily instantiate and return singleton. You just call it instead of using `new` on it at the place of use. It's probably not very nice from philosophical standpoint but it can have its merits.