|
|
|
|
|
by adrianN
2716 days ago
|
|
I'm not sure what you mean by generics if you think that C++ templates are not a kind of generics. Do you prefer that everything happens at runtime? Similarly, subclasses as opposed to templates carry a runtime cost. Virtual function calls are not free. Why pay that cost if you can deduce the right code from the types at compiletime? Besides, and this is probably a matter of opinion, I find code hard to follow that uses inheritance heavily. |
|