Skip to main content
7 events
when toggle format what by license comment
Nov 18, 2015 at 8:04 comment added BЈовић @whatsisname Depends on the factory's implementation.
Nov 18, 2015 at 6:19 comment added BЈовић @ArmonSafai ???
Nov 18, 2015 at 5:11 comment added whatsisname How's your factory going to decide which pointer to use? Eventually you have to make a decision.
Nov 17, 2015 at 18:00 comment added Armon Safai tutorialspoint.com/design_pattern/factory_pattern.htm
Nov 17, 2015 at 12:34 comment added BЈовић @amon I meant to use other types of DI - not the factory.
Nov 17, 2015 at 11:23 comment added amon How is switch/case better than conditionals? Using a map/dict/table to represent code as data is good, if you actually need a registry of different implementations – e.g. in some DI container implementations. But having different callbacks of the same type is not necessary for most factories! I don't quite get why you are suggesting that. Also, many DI containers are implemented in terms of factory objects, so suggesting to use DI instead of factories seems a bit circular.
Nov 17, 2015 at 10:26 history answered BЈовић CC BY-SA 3.0