3 ms·
>That's probably more a matter of taste. Go has a reflect package which allows the programmer to determine type at runtime, making generics unnecessary. That's
by coldtea 12y ago
>That's probably more a matter of taste. Go has a reflect package which allows the programmer to determine type at runtime, making generics unnecessary.
That's not "making generics unnecessary". That's "using an ugly hack that throws typesafety away instead of a proper solution".
And it's more familiar than generics, that's what Java had before they understood that they had to have generics.
- firebrand39 12y agoWell, you are right it reminded me of method overloading. Otherwise I think time will tell. In the end generics are just types with parameters, for creating typed permutations _at_compile_time_ of functions/maps etc.. And as you said, java worked quite a while without them.