We don't do this in C++/Java because object & methods are compiled into address, and you can't concatenate arbitary memory/VM address directly like getattr()
Factory pattern is basically a huge pile of lookup table of if's and switch's, unless you use some clever voodoo in reflection, it's just a bridge to map semantic vars to memory/VM addresses.
Which in a way, is a user-level re-implementation of a dynamic language engine (poor man's version)
Factory pattern is basically a huge pile of lookup table of if's and switch's, unless you use some clever voodoo in reflection, it's just a bridge to map semantic vars to memory/VM addresses.
Which in a way, is a user-level re-implementation of a dynamic language engine (poor man's version)