2 ms·
You want to erase generics because you don't want to bake a specific variance model into your runtime. Erasing generics allows languages with different variance
by pron 8y ago
You want to erase generics because you don't want to bake a specific variance model into your runtime. Erasing generics allows languages with different variance (e.g. Java, Kotlin and Clojure) to share code and data structures. This is not an issue for generics of non-subtypable types, which is why generics of the forthcoming value types will be specialized rather than erased.