Macros are not an alternative to generics, they're an alternative to C++'s template specialisation.
Most languages with generics don't provide for user-controlled code generation via generics (if they do generics-based codegen at all, IIRC GHC uses erased generics for instance). They tend to use macro systems or preprocessors instead.
AKA macros.
I wish they were at least intellectually honest and just call them "macros" and start nice supporting hygienic macros in the language.