3 ms·
If you don't have generics, you either check the data type at runtime (e.g. dynamic types, or dynamic dispatch in a statically-typed language) or you write diff
by SAI_Peregrinus 4y ago
If you don't have generics, you either check the data type at runtime (e.g. dynamic types, or dynamic dispatch in a statically-typed language) or you write different functions for every data type you want your function to handle.