I am looking for an good explanation, maybe with some examples. In my understanding, something is "generic" when it can be used for multiple purposes. But I may be wrong...
The root is the same as "genus" -- it means describing all the members of a group of related things.
In programming terms, it means you're describing a whole collection of things that share a common pattern or template, with only small variations. C++ templates and Java generics are, to the programmer, more or less the same thing: a way of saying "whatever the underlying type is, I want to be able to do these things." The implementaiton methods are different, but the idea is the same.
So the idea is, itself, somewhat generic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With