~/talk

Teach Kotlin to play well with Java - Optimization tips for Interoperability

Talkat droidcon San Francisco 2018 · 2018-11-19..11-20· [kotlin, java]
links:none on file
links:none on file

Kotlin-to-Java interoperability covers 11 practical fixes: rename generated classes to avoid AmazingUtilsKt with @file:JvmName and @JvmMultifileClass; avoid signature clashes and give extension functions clear Java names with @JvmName; expose companion utilities as real statics with @JvmStatic or fields with @JvmField/const/lateinit; generate overloads for default parameters with @JvmOverloads; advertise checked exceptions with @Throws; prefer Java SAM interfaces for clean Java lambdas; defensively copy Kotlin immutable collections; expose coroutines as CompletableFuture for Java consumption.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 6:11Access scopes in Kotlin
  3. 9:27Top-level functions naming
  4. 12:34Extension function naming
  5. 14:41Signature clash in extensions
  6. 16:47Getters and setters naming
  7. 18:35Companion objects and static methods
  8. 20:00Avoiding getters and setters
  9. 23:06Default parameters with Java
  10. 25:31Checked exceptions in Kotlin
  11. 29:50Higher-order functions in Java
  12. 34:03Immutability with Java
  13. 35:48Coroutines for Java interop
  14. 39:01Q&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.