Re:Kotlin, the Swift of Android
by V-2 on Monday September 01, 2014 @12:40PM
(#8253683)
Kotlin has stuff that's unlikely to appear in Java, such as reified generics - Java has already chosen type erasure generics instead. I wouldn't bet a penny that they ever change this approach if they didn't go with it from the start.
[ Parent
| on HN ]
In fact Kotlin doesn't have reified generics. This idea was planned in the beginning and was reflected in the old docs but abandoned later. I believe there's no reference to reified generics on the new web site anymore.
Huh, you're right! That's a pity
Java is getting reified generics via a really cool mechanism called classdynamic (which also enables efficient implementation of tuples). This is pretty much necessitated by value types. See project Valhalla: http://www.infoq.com/news/2014/07/Project-Valhalla