3 ms·
These generics are not the way Java generic works. These are essentially specialized code genereted for each type (just like C++/Rust). You can have a look at
by ankurdhama 5y ago
These generics are not the way Java generic works. These are essentially specialized code genereted for each type (just like C++/Rust).
You can have a look at the essembly code generated by Go program while using a slice of interface{} vs using slice of specific type on compiler explorer.
Edit: Removed C ... somehow have a habit of writing C/C++ together :)
- moogly 5y agoC doesn't have reified generics. You could put C# in that list though.
- ankurdhama 5y agoYup... old habit of writing C/C++ :)