~/talk

Kotlin Internal DSL - Create Your Own Language

Talkat droidcon SF 2019 · 2019-11-18..11-19· [kotlin]
links:none on file
slides:none on file

Kotlin features let an internal DSL compress a messy 20–30‑field data‑class setup into a short builder chain and make Android patterns like intent creation and activity launch readable and reusable. Examples show a date literal API (25 November), a plus‑days/oneWeek operator, a launchActivity extension that runs an intent block as receiver, and a UIState builder that uses apply and build; all use infix extension functions, lambda receivers and reified generics to remove boilerplate and run in real code.

AI-written summary · about

  1. 0:00Introduction
  2. 1:58Problem solved by DSL
  3. 4:48DSL characteristics
  4. 8:58Internal vs external DSL
  5. 10:42Kotlin features for DSL
  6. 11:24Infix functions
  7. 12:06Extension functions
  8. 13:10Lambdas and higher order functions
  9. 15:36Lambda receivers
  10. 18:49Building fluent constructs
  11. 23:26Android activity launch DSL
  12. 29:53Reified generics and inline
  13. 31:19Builder pattern with DSL
  14. 35:56Kotlin standard functions
  15. 36:57Conclusion and Q&A
~/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.