~/talk

Kids, Play Nice! - Writing With Kotlin-Java Interop

Talkat droidcon NYC 2019 · 2019-08-26..08-27· [kotlin, java]
slides:none on file

Nexmo’s Kotlin-Java interop experience delivers ten concrete fixes: annotate nullability to avoid platform types, prefer bean-style getters, use @JvmOverloads and @JvmName/@JvmStatic/@JvmField to give Java sane overloads and names, expose SAM interfaces or Java-written functional interfaces to keep lambdas, put the lambda parameter last, avoid returning Unit, and be cautious because sealed classes don’t map cleanly to Java. Use Android Studio’s Kotlin bytecode → decompile to Java and lint checks and validate by writing both Java and Kotlin client apps.

AI-written summary · about

  1. 0:00Introduction to Kotlin-Java interop
  2. 2:33Why Kotlin-Java interop matters
  3. 4:40How JVM handles Kotlin and Java
  4. 8:28Top 10 tips for interop
  5. 17:44Method naming and operators
  6. 25:45Lambda arguments and interfaces
  7. 27:53Companion objects and files
  8. 31:46Sealed classes and open classes
  9. 33:11Bonus tips and testing
  10. 36:24Q&A and closing
~/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.