Kotlin Pickups

in #kotlin6 years ago

To make the concept of reified concrete an example is in order: Context.systemService() in Android KTX uses reified to pass a "real" type via generics. No more passing classes to getSystemService!

https://github.com/android/android-ktx/blob/master/src/main/java/androidx/core/content/Context.kt#L37!

Docs: https://kotlinlang.org/docs/reference/inline-functions.html#reified-type-parameters

#31DaysOfKotlin
image

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.033
BTC 62986.12
ETH 3072.14
USDT 1.00
SBD 3.84