~/talk

Kotlin DSL in under an hour

Talkat Øredev 2019 · 2019-11-06..11-08· [kotlin]

Live coding shows a real Kotlin DSL built atop existing Java classes: Java Consumer becomes a Kotlin lambda, builders turn into nested createClient/create blocks using lambdas with receiver, extension functions and extension properties, and apply to run builders. A custom DSL marker annotation enforces non‑interleaving at compile time and IDE completion surfaces DSL methods. The demo compiles and runs, the extraction into a reusable library is demonstrated, and the resulting scripts are shorter and idiomatic Kotlin.

AI-written summary · about

  1. 0:00Introduction
  2. 2:47Examples
  3. 6:17Entry point
  4. 7:13Example
  5. 18:39Functional interface
  6. 22:37lambda with receiver
  7. 29:34library
  8. 30:00API
  9. 30:27Design Approach
  10. 30:54If
  11. 31:30Invalid
  12. 33:48Compiler error
  13. 34:25Bonus
  14. 35:45Creating a client
  15. 36:14Creating a local date
  16. 37:04Adding an extension function on an integer
~/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.