KotlinBytes - Kotlin inline / crossinline / noinline Functions
In this episode, I will explain the differences between inline / crossinline / noinline functions and when to use them.
Kotlin Callbacks, Closures & Lambdas:
https://youtu.be/icqv4isFopo
Chapters:
0:00 - Intro
0:18 - Inline Example
1:27 - Compare inline Bytecode
2:26 - Crossinline Example
3:46 - Noinline Example
4:39 - When Not to use inline functions
5:03 - Reified Generics
5:35 - Wrapping Up
Source code:
https://github.com/jacobklewis/Scratch-Notes/tree/master/src/main/kotlin/me/jacoblewis/inline
Additional Resources:
https://kotlinlang.org/docs/reference/inline-functions.html
Music:
Lo-Fi Hip Hop Beat To Study And Relax To by 808 DEATH CLUB | https://soundcloud.com/808_deathclub
Music promoted by https://www.free-stock-music.com
Creative Commons Attribution 3.0 Unported License
https://creativecommons.org/licenses/by/3.0/deed.en_US
Back Home by | e s c p | https://escp-music.bandcamp.com
Music promoted by https://www.free-stock-music.com
Attribution 4.0 International (CC BY 4.0)
https://creativecommons.org/licenses/by/4.0/