filmov
tv
Kotlin Extension Functions & Inline Functions | Cheezycode #36

Показать описание
In this tutorial, learn what are extension functions and how to define them. It is useful when you want to extend the functionality of a class by adding members external to the class. Inline functions are defined by just adding an inline keyword before the function declaration. It improves performance by reducing the number of objects created. Behind the scenes, Kotlin creates a class and instance for lambdas which can impact the performance if we use a large number of lambdas. You can use the inline keyword to improve its performance. What it does is - Just copy paste the body of the function wherever it is called. This tutorial is part #36 of Kotlin Programming For Beginners Series. Learn Object Oriented Programming in Kotlin. Everything is explained in Hindi. Brief topics covered -
1. What are extension functions?
2. How to define the extension function in Kotlin?
3. Disadvantages of defining lambdas
4. Improve performance by marking functions as inline in Kotlin
5. Compare bytecode of the functions with or without inline keyword
Learn all this in Hindi (हिंदी में )
Kotlin Lambda Expression and Lambda Functions -
Kotlin Beginners Tutorial Series -
For more info - visit below link
We are social. Follow us at -
1. What are extension functions?
2. How to define the extension function in Kotlin?
3. Disadvantages of defining lambdas
4. Improve performance by marking functions as inline in Kotlin
5. Compare bytecode of the functions with or without inline keyword
Learn all this in Hindi (हिंदी में )
Kotlin Lambda Expression and Lambda Functions -
Kotlin Beginners Tutorial Series -
For more info - visit below link
We are social. Follow us at -
Комментарии