In previous chapters, most of the concepts we covered were familiar to Java developers. In this chapter, we are introducing a feature that is not known in Java at all--extensions. It is one of the best Kotlin features, and lots of Kotlin developers mention it as their favorite one. Extensions provide big improvements in Android development.
In this chapter, we will cover the following topics:
- Extension functions
- Extension properties
- Member extension functions
- Generic extension functions
- Collection processing
- Function type with receiver and function literal with receiver
- Kotlin generic extension functions for any object
- Kotlin's domain-specific language