~/talk

Generating Kotlin Code

Talkat KotlinConf 2017 · 2017-11-02..11-03· [kotlin, developer-experience]
links:none on file
slides:none on file

Generating Kotlin from schemas produces more concise, safer APIs (example: converting Square’s Wire protos to Kotlin constructors, immutable lists and data semantics) and requires explicit Java interop choices such as using @JvmField to preserve field access. KotlinPoet handles imports, nonlinear generation, code blocks and expression-body optimization; ASM plus Kotlin metadata proto lets bytecode be patched to add named/default parameters for Java libraries. Watch for reified methods becoming private, SAM/Unit lambda quirks, extension-function file-class naming hacks, and that KotlinPoet currently runs only on the JVM.

AI-written summary · about

  1. 0:00Start
  2. 0:16Kotlin Cogeneration
  3. 0:46Kotlin as a Code Generator
  4. 2:49Why Would You Generate Kotlin Code as Opposed to Something like Java
  5. 6:55Builder Class
  6. 9:18Reified Types
  7. 11:39Extension Functions
  8. 17:54Convenience Functions
  9. 18:45String Format Syntax
  10. 27:53Jvm Bytecode
  11. 29:59Getter Method
  12. 33:55Multi-Platform Support
~/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.