~/talk

Exploring the Kotlin Type Hierarchy from Top to Bottom

Talkat KotlinConf 2018 · 2018-10-03..10-05· [kotlin, typescript]
name:Nat Pryce
links:none on file
slides:none on file

Claim: Kotlin's type system has few, composable rules that make null safety and unreachable-code analysis follow from subtyping rather than ad‑hoc checks. It treats Any as top, Nothing as bottom and Unit as a singleton value; nullable types are implemented as nullable-is-subtyping. The talk demonstrates real production examples (HTTP4k + crouton + result4k) where compiler/IDE type inference removes boilerplate, reduces unit tests, and even exposed a crouton edge that crashed older compilers.

AI-written summary · about

  1. 0:00Intro
  2. 3:06Types classify syntactic expressions, not runtime values
  3. 7:46There's no trade off between type safety & clarity
  4. 11:01Kotlin types are related by subtyping
  5. 18:16We can include control flow in expressions
  6. 20:28We can write our own control flow statements
  7. 24:39Nullability is itself a subtype relationship
  8. 29:01The null literal can cause overload ambiguity
  9. 37:53Separate types for read, write & read/write
~/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.