Kotlin DSLs in 42 minutes
summary
Step‑by‑step live coding shows how to turn Java builders into a type‑safe, statically typed Kotlin DSL using lambdas with receiver and extension functions, plus stdlib helpers like apply and delegated properties. Examples include an HTML/JSON-style builder (kotlinx.html), a guarded‑by lock state wrapper implemented with an operator invoke, and Gradle Kotlin DSL usage; the produced DSL compiles cross‑platform, gives IDE completion, and the demo code runs (even tweeted as a 280‑char snippet).
AI-written summary · about
chapters (12)
- 0:00Start
- 7:27Create a Small Application Which Deals with an Existing Java
- 9:04Type Inference
- 9:39Properties
- 10:39Agility Function
- 11:41Parameter Templates
- 18:14Lambdas
- 20:12Extension Functions
- 25:29Readability
- 26:52Types of Builders
- 33:07Delegated Properties and Delegated Implementations
- 36:40Gradle Script








