4 ms·
I think you're missing something about generics, yes. Firstly, often you don't know the type you're working with because you're writing a generic library, made
by solipsism 12y ago
I think you're missing something about generics, yes. Firstly, often you don't know the type you're working with because you're writing a generic library, made to be used generically. Secondly, often you want to write some generic data structures or algorithms and parameterize them over multiple known types, and generics help you avoid repeating yourself but maintain strong static typing.