All You Need to Know About the REIFIED Keyword In Kotlin

preview_player
Показать описание
Follow for more Android & Kotlin tips 🙌
Рекомендации по теме
Комментарии
Автор

Thank you for explanation and sharing, it helped with the general idea, but I want to correct some of your explanation that may have slipped. The actual type is available at compile time (not run-time), and erased at runtime by the Type Erasure that Java has always had, and since the type is erased in runtime, we don't have the information of the generic type, so we can't do operations like casting to this specific type or accessing its class. In Java they used to pass in the actual class of the generic type in order to access it the class of the generic, but as you explained that Kotlin has the inline and refied keyword which is causing the function body bytecode to be copied at each place its called from.

ahmadhamwi
Автор

Amazing info, thanks for all these shorts

voidpointer
Автор

I really love this Kotlin short videos

ojtoborowei
Автор

Useful. I no longer have to pass a Class parameter to my functions.

MirrorsEdgeGamer
Автор

Dear god what is this awful programming language

CJFX_