|
|
|
|
|
by pkolaczk
3388 days ago
|
|
> Kotlin has generics that are in most circumstances reified enough ;). They are not more reified than what you can achieve by just putting Class<T> fields in Java objects to represent the runtime type of the generic type parameter. Sure, Java solution is kinda more verbose and ugly, but this is basically what people already said here: Kotlin has some nice syntax sugar. But you still can't have two different methods differing only with the generic type parameter (e.g. List<String> and List<Integer>). And the code is still not-specialized properly, read "slow". Real reification will be possible if project Valhalla arrives (maybe Java 10, who knows?) |
|