~/talk

Creating Internal DSLs in Kotlin

Talkat KotlinConf 2018 · 2018-10-03..10-05· [kotlin, developer-experience]
slides:none on file

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

  1. 0:00Start
  2. 1:23Examples of Dsl
  3. 1:39What Are External Dsl versus Internal Dsl
  4. 2:18External Dsl
  5. 3:23Internal Dsl
  6. 3:48Disadvantage of an Internal Dsl
  7. 6:11Fluency
  8. 8:22Semicolon Is Optional
  9. 12:12Extension Methods
  10. 13:57Example of an Extension Method
  11. 18:16Process Method
  12. 21:32Javascript
  13. 24:27Implicit Receiver
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.