Read a bit about the #Zig #programming language, since that's everyone's new favorite, and I must say they've got a fascinating approach to generic typing.
Zig doesn't have generics in the traditional sense. It accomplishes the same thing using metaprogramming instead. A generic type is a function that executes at compile time, takes type parameters, and returns a concrete type.
This could be *much* more powerful than traditional generics.