3 ms·
> Generics aren't a cure-all, they merely duplicate code and change the type. Its not much better than copy-paste and replace the type names. Nobody ever said
by aikah 8y ago
> Generics aren't a cure-all, they merely duplicate code and change the type. Its not much better than copy-paste and replace the type names.
Nobody ever said that.
> . Its not much better than copy-paste and replace the type names.
Yes it is. You let the compiler do the job, instead of doing it manually.
- dana321 8y agoOk, well i just said it, so somebody did. There is no difference whatsoever between the same function duplicated with different types.
- aikah 8y ago> Ok, well i just said it, so somebody did. Don't be obtuse, nobody ever said "Generics are a cure-all". > There is no difference whatsoever between the same function duplicated with different types. Yes there is, it's called polymorphism.