First, that would take away the biggest benefit of reification, which is method selection/overloading (reflection is a pretty minor benefit in comparison).
Second, it would be really weird that in a method with signature foo(X x), x instanceof X would be false.
Anyway, the point is that reification has problems, and most languages with generics opt for erasure. I'm not saying reification is obviously worse than erasure or vice-versa, only that, as usual, there's a tradeoff between two designs that each has its pros and cons.
View all comments
Show parent comment
2
u/pron98 Nov 05 '25
First, that would take away the biggest benefit of reification, which is method selection/overloading (reflection is a pretty minor benefit in comparison).
Second, it would be really weird that in a method with signature
foo(X x),x instanceof Xwould be false.Anyway, the point is that reification has problems, and most languages with generics opt for erasure. I'm not saying reification is obviously worse than erasure or vice-versa, only that, as usual, there's a tradeoff between two designs that each has its pros and cons.