I have to make a decision regarding generalization vs polymorphism.
Well the scenario is standard: I want to make my monolithic interdependent code to be more modula
I use both in my large code base. When the type is known at compile time, I design it with templates, when it's known only at run time, I use virtual functions. I find the virtual functions easier to program and easier to read later, however there are times where performance is critical and the fact that the templated polymorphism (if you can really call it polymorphism) can be inlined really helps.