Effective Kotlin: Item 26 — Don’t use raw types

In Java using raw types such as List instead of List<Integer> can lead to ClassCastExceptions and as such Effective Java by Joshua Bloch recommends against their use when dealing with generics.

Kotlin, on the other hand, doesn’t have raw types, you always have to specify the type parameter. For Java interoperability raw types are converted into star projections where List becomes List<*>! which maps to List<out Any?>!. Star projections are a way to say that you know nothing about the type argument but remain “safe” — in basic terms get returns Any