~/talk

Kotlin DSL in under an hour

Talkat Voxxed Days Cluj-Napoca 2018 · 2018-11-21..11-23· [kotlin]
slides:none on file

Shows how to turn existing Java builder classes into a readable, statically typed Kotlin DSL by live-coding a client builder that compiles and runs. Uses extension functions and properties, lambda with receiver for nested blocks, and wraps Java types with annotated Kotlin subclasses to enforce scope via @DslMarker scope control. Demonstrates IDE completion, refactoring, and compile-time checks across examples (HTML builders, Gradle Kotlin DSL, TeamCity, Ktor), and the resulting DSL compiles and behaves like normal Kotlin code.

AI-written summary · about

  1. 0:00Intro
  2. 1:02What is DSL
  3. 3:08Examples
  4. 7:11Similarities
  5. 7:50Structure
  6. 9:20Transformation
  7. 12:58Extension Functions
  8. 13:33Console String
  9. 19:38Create Client
  10. 20:24Simplify Code
  11. 29:43Comparison
  12. 31:08Scope control
  13. 34:03DSL marker annotation
  14. 36:18Method invocation
  15. 39:08Build configuration
  16. 42:13Conclusion
~/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.