~/talk

Flexible Types in Kotlin

Talkat JVM Language Summit 2015 · 2015-08-10..08-12· [java]
slides:none on file

Kotlin adds platform types to bridge JVM interop, treating Java types as a pair of narrow/wide bounds so the compiler lets risky calls compile and defers failure to runtime; that design intentionally sacrifices type-soundness to avoid JVM-call overhead. Arrays get runtime checks like Java, but generic collections introduce a real regression — Kotlin can be less safe than Java because covariant read-only views plus erasure let a List<String> flow into a List<Object> and fail later. Annotations and extra runtime guards reduce but don’t eliminate these problems; the same machinery also enables a JavaScript dynamic mode.

AI-written summary · about

  1. 0:00Intro
  2. 1:25Safety Features
  3. 2:30Interoperability
  4. 3:12Example: Arrays
  5. 5:51Java (as seen from Kotlin)
  6. 6:54Java Interop: All Nullable
  7. 8:36Annotations
  8. 10:31Pick Two
  9. 11:33Dereferencing Flexible Values
  10. 12:11Assignability
  11. 14:44Representation
  12. 16:24Equivalence
  13. 18:03Runtime Checks (and their absence)
  14. 19:34Some Notes
  15. 21:03Kotlin Arrays
  16. 23:00Arrays: Example
  17. 25:24Java: Flexible Types
  18. 31:54Ad Hoc Check
  19. 32:41Runtime Checks and their absence
  20. 34:23Raw Types
  21. 37:14Summary (11)
  22. 40:23Expressing dynamic types for
~/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.