Can someone smarter than me explain what they mean by "reified generics", "erased generics", and a use case for when to use one over the other?
Example, Java is using erased generics. Once the code is compiled, the generics information is no longer in the bytecode. List<String> becomes List<>. This is called type erasure.
C# is using reified generics where this information is preserved. List<String> is still List<String> after compilation
I'm not smarter than you but.
I believe the terms reified generics and erased generics is the type sweaty donkey ball terminology you get for professional CS academics.
Sticking my neck out further.
Reified generics means the type is available at run time. In C# you can write if(obj.GetType() == typeof(typename))
Erased generics the type information is not available at run time. That's the way Java does it and it kinda sucks.
With reified generics, the code
compiles to: On the other hand, erased generics compiles to this: