Creating Internal DSLs in Kotlin
summary
Kotlin features shown as concrete tools for internal DSLs: infix functions, extension functions, and lambdas with receiver (implicit receiver) are used to drop parentheses and inject context. Examples build working mini‑DSLs: "2 days ago" / "2 days from now" date arithmetic, a meeting builder that parses "planning meeting starts at 3:15" and prints the time, and a robot script like "turns left runs fast"; each example compiles and runs in the demos.
AI-written summary · about
chapters (13)
- 0:00Start
- 1:23Examples of Dsl
- 1:39What Are External Dsl versus Internal Dsl
- 2:18External Dsl
- 3:23Internal Dsl
- 3:48Disadvantage of an Internal Dsl
- 6:11Fluency
- 8:22Semicolon Is Optional
- 12:12Extension Methods
- 13:57Example of an Extension Method
- 18:16Process Method
- 21:32Javascript
- 24:27Implicit Receiver








