Session

Kotlin DSL in under an hour

Learn how to create type-safe and statically typed DSLs in Kotlin. In this session, you will learn about the language features that make DSL creation possible:
- Top-level extension functions and properties
- Trailing lambda expressions as function parameters
- SAM type conversion
- Functional literals with receiver
- Infix functions
- Standard library scope functions
- Context receivers
Step by step, using the features above, I will convert Java code based on the builder pattern into an internal Kotlin DSL. The talk highlights the specific cases for using the DSL approach in Kotlin and the tradeoffs for introducing this programming technique into the projects.

Anton Arhipov

Developer Advocate, JetBrains

Tallinn, Estonia

View Speaker Profile