3 ms·
C's macros are a form of code generation. In context, generics is parametric polymorphism[0] which does not imply code generation, though it can be extended to
by masklinn 12y ago
C's macros are a form of code generation. In context, generics is parametric polymorphism[0] which does not imply code generation, though it can be extended to support it (template specialisation). Parametric polymorphism is about static type-safety.
[0] http://en.wikipedia.org/wiki/Parametric_polymorphism http://en.wikipedia.org/wiki/Parametric_polymorphism