~/talk

Kotlin DSLs in 42 minutes

Talkat Devoxx Belgium 2017 · 2017-11-06..11-10· [kotlin]
slides:none on file

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

  1. 0:00Start
  2. 7:27Create a Small Application Which Deals with an Existing Java
  3. 9:04Type Inference
  4. 9:39Properties
  5. 10:39Agility Function
  6. 11:41Parameter Templates
  7. 18:14Lambdas
  8. 20:12Extension Functions
  9. 25:29Readability
  10. 26:52Types of Builders
  11. 33:07Delegated Properties and Delegated Implementations
  12. 36:40Gradle Script
~/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.