Advanced Language for Kotlins
Advanced Kotlin language features are tools for extending and testing code beyond the basics, mainly property delegates, extension functions, lambdas with receivers, type-safe DSL builders and unit testing. They let a library expose expressive APIs, such as Gradle Kotlin scripts, while keeping the code statically checked.
Stage: Idiomatic Kotlin · Part of the Kotlin roadmap · Last reviewed 19 November 2026
What to learn in Advanced Language
- Implement a custom property delegate and use the built-in lazy and observable delegates
- Write extension functions and explain how they are resolved statically
- Build a small type-safe DSL using lambdas with receivers
- Write unit tests with JUnit and assert behaviour of Kotlin code
- Use inline functions and reified type parameters where they help
Advanced Language interview questions
How does the lazy delegate work in Kotlin?
lazy takes an initialiser lambda and runs it on first access, then caches the result for later reads. By default it is thread safe through synchronisation. Use it for expensive properties that may never be needed, and choose another mode if you do not need locking.
What is a lambda with receiver?
It is a function literal of a type like T.() -> Unit, where the body can call members of T directly through this. Builders such as buildString and HTML DSLs rely on it, because it lets nested blocks configure an object without repeating its name.
Where Advanced Language fits in the Kotlin roadmap
Advanced Language belongs to the Idiomatic Kotlin stage (intermediate level), which takes about 22 hours. Collections and DSLs.
Other units in this stage
Back to the full Kotlin roadmap